airborne12 opened a new pull request, #49232:
URL: https://github.com/apache/doris/pull/49232
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
This pull request introduces a new configuration option to control whether
the RAM directory is used during compaction in the inverted index. It includes
updates to configuration files, modifications to the `RowsetWriter` and
`InvertedIndexFileWriter` classes, and new tests to verify the functionality.
### Configuration Updates:
* Added a new configuration option
`inverted_index_ram_dir_enable_when_compaction` to control whether the RAM
directory is used during compaction. (`be/src/common/config.cpp` -
[[1]](diffhunk://#diff-b626e6ab16bc72abf40db76bf5094fcc8ca3c37534c2eb83b63b7805e1b601ffR1109-R1110)
`be/src/common/config.h` -
[[2]](diffhunk://#diff-46e8c1ada0d43acf8c2965e46e90909089aada1f46531976c10605b837f8da3dR1153-R1154)
### Code Changes:
* Updated `RowsetWriter` to respect the new configuration option when
creating `InvertedIndexFileWriter` instances.
(`be/src/olap/rowset/rowset_writer.h` -
[be/src/olap/rowset/rowset_writer.hR111-R118](diffhunk://#diff-7e30ea97f26638046dfedb406bb2933f797f3dfcef6b7b29143bdcde0d55f905R111-R118))
* Modified `InvertedIndexFileWriter` to accept a boolean parameter
indicating whether the RAM directory can be used.
(`be/src/olap/rowset/segment_v2/inverted_index_file_writer.cpp` -
[[1]](diffhunk://#diff-94ffab4c6236b02a6939f6f970b1f7083f854dfcdfaac805c6e15ee413166030L64-R65)
`be/src/olap/rowset/segment_v2/inverted_index_file_writer.h` -
[[2]](diffhunk://#diff-f8bce04efa0a82257310e441a1a88c1aa90c457b278864d49f233b21713ca36aL60-R68)
[[3]](diffhunk://#diff-f8bce04efa0a82257310e441a1a88c1aa90c457b278864d49f233b21713ca36aR178)
### Tests:
* Added tests to verify the behavior of `InvertedIndexFileWriter` with the
new configuration option.
(`be/test/olap/rowset/segment_v2/inverted_index_file_writer_test.cpp` -
[be/test/olap/rowset/segment_v2/inverted_index_file_writer_test.cppR148-R202](diffhunk://#diff-e6c4b20bab95812887e04dbf79c797918d62e17b8926e99d991d297158a1ca5eR148-R202))
These changes ensure that the inverted index can be configured to use or not
use the RAM directory during compaction, providing more flexibility in managing
system resources.
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should
merge into -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]