bitflicker64 commented on code in PR #3164:
URL: https://github.com/apache/hugegraph/pull/3164#discussion_r3999405850
##########
hugegraph-store/hg-store-core/src/main/java/org/apache/hugegraph/store/business/BusinessHandlerImpl.java:
##########
@@ -154,6 +165,18 @@ public class BusinessHandlerImpl implements
BusinessHandler {
private final InnerKeyCreator keyCreator;
private final Semaphore semaphore = new Semaphore(1);
+ /* Bounds how long dbCompaction() waits to acquire compactionRangeLock
when a snapshot
+ save is holding it. saveSnapshot() is a RocksDB Checkpoint (hard-links
existing SST
+ files, no data copy) plus a partial checksum read, so the lock is
normally held for
+ well under a second, at most a few seconds under a slow/busy disk. 10s
gives generous
+ margin over that expected hold time while keeping a stuck snapshot save
from blocking
+ compaction for long: if the wait is exceeded, dbCompaction just skips
this pass and
+ relies on the next trigger (PD instruction, REST call, etc.) to retry -
see the
Review Comment:
🧹 This still says a skipped pass "relies on the next trigger (PD
instruction, REST call, etc.) to retry", but those triggers are one-shot
(`PartitionEngine.java:1017,1263`, `HgStoreEngine.java:505`,
`PartitionAPI.java:207`), so a skipped compaction is dropped. The last commit
removed the same claim from the inline comment at 1446-1448, but that comment
now ends mid-sentence ("rather than block - callers of dbCompaction().").
Could you say here that the request is dropped with a WARN and not retried,
and finish the inline sentence (e.g. "rather than block the compaction pool
thread")?
--
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]