lweitzendorf commented on code in PR #692: URL: https://github.com/apache/jackrabbit-oak/pull/692#discussion_r995532315
########## oak-doc/src/site/markdown/nodestore/segment/overview.md: ########## @@ -807,24 +823,25 @@ This option is optional and is disabled by default. ### <a name="compact"/> Compact ``` -java -jar oak-run.jar compact [--force] [--mmap] [--compactor] SOURCE [--target-path DESTINATION] [--persistent-cache-path PERSISTENT_CACHE_PATH] [--persistent-cache-size-gb <PERSISTENT_CACHE_SIZE_GB>] +java -jar oak-run.jar compact [--force] [--mmap] [--compactor] [--threads] SOURCE [--target-path DESTINATION] [--persistent-cache-path PERSISTENT_CACHE_PATH] [--persistent-cache-size-gb <PERSISTENT_CACHE_SIZE_GB>] ``` The `compact` command performs offline compaction of the local/remote Segment Store at `SOURCE`. `SOURCE` must be a valid path/uri to an existing Segment Store. Currently, Azure Segment Store and AWS Segment Store the supported remote Segment Stores. Please refer to the [Remote Segment Stores](#remote-segment-stores) section for details on how to correctly specify connection URIs. -If the optional `--force [Boolean]` argument is set to `true` the tool ignores a non -matching Segment Store version. *CAUTION*: this will upgrade the Segment Store to the +If the optional `--force [Boolean]` argument is set to `true` the tool ignores a non-matching Segment Store version. *CAUTION*: this will upgrade the Segment Store to the latest version, which is incompatible with older versions. *There is no way to downgrade an accidentally upgraded Segment Store*. The optional `--mmap [Boolean]` argument can be used to control the file access mode. Set to `true` for memory mapped access and `false` for file access. If not specified, memory -mapped access is used on 64 bit systems and file access is used on 32 bit systems. On +mapped access is used on 64-bit systems and file access is used on 32-bit systems. On Windows, regular file access is always enforced and this option is ignored. -The optional `--compactor [String]` argument can be used to pick the compactor type to be used. Valid choices are *classic* and *diff*. While the former is slower, it might be more stable, due to lack of optimisations employed by the *diff* compactor which compacts the checkpoints on top of each other. If not specified, *diff* compactor is used. +The optional `--compactor [String]` argument can be used to pick the compactor type to be used. Valid choices are *classic*, *diff* and *parallel*. While *classic* is slower, it might be more stable, due to lack of optimisations employed by the *diff* compactor which compacts the checkpoints on top of each other and the *parallel* compactor, which additionally divides the repository into multiple parts to process in parallel. If not specified, *parallel* compactor is used. Review Comment: I agree that it's risky to default to the multithreaded `ParallelCompactor`. However, I also think defaulting to a single thread should be safe. If you have a look at the `compactWithDelegate` method, it should be easy to verify that the behavior is in fact identical to `CheckpointCompactor` in this case. I will change the call for sequential compaction to `super.compactWithDelegate(before, after, onto, canceller)` to make this even more explicit. If you still have concerns, I will change all of the defaults to diff but keep the default thread count for parallel at -1 (if the semantics of thread count discussed in the other comment are acceptable). -- 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]
