kasakrisz commented on code in PR #6286:
URL: https://github.com/apache/hive/pull/6286#discussion_r2840122623
##########
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/CompactorTest.java:
##########
@@ -735,7 +733,13 @@ enum CommitAction {
}
protected long compactInTxn(CompactionRequest rqst) throws Exception {
- return compactInTxn(rqst, CommitAction.COMMIT);
+ long compactorTxnId = compactInTxn(rqst, CommitAction.COMMIT);
+
+ // Wait for the cooldown period so the Cleaner can see the last committed
txn as the highest committed watermark
+ // TODO: doesn't belong here, should probably be moved to
CompactorTest#startCleaner()
+ Thread.sleep(MetastoreConf.getTimeVar(
+ conf, ConfVars.TXN_OPENTXN_TIMEOUT, TimeUnit.MILLISECONDS));
+ return compactorTxnId;
Review Comment:
Thanks for the explanation.
> however, as i understand the txn won't be considered committed sooner that
this TXN_OPENTXN_TIMEOUT config
That makes sense. Is it possible that while the test is running on one
thread and waiting for the timeout, the commit—running on another thread—gets
blocked by a lack of resources? If the commit actually happens later than the
timeout, would that cause any issues?
If we have the chance, perhaps in a follow-up PR, I’m leaning toward
> we could probably query TXNS table and wait for 'c' status. c - committed.
--
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]