swamirishi commented on code in PR #6171:
URL: https://github.com/apache/ozone/pull/6171#discussion_r1480430031
##########
hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/ozone/rocksdiff/RocksDBCheckpointDiffer.java:
##########
@@ -587,7 +587,7 @@ void addToCompactionLogTable(CompactionLogEntry
compactionLogEntry) {
* Check if there is any in_progress tarball creation request and wait till
* all tarball creation finish, and it gets notified.
*/
- private void waitForTarballCreation() {
+ private synchronized void waitForTarballCreation() {
Review Comment:
How would this change help in anyway? I don't think rocksdb will do multiple
compaction in parallel. onCompactionCompleted method will commit the compaction.
##########
hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/ozone/rocksdiff/RocksDBCheckpointDiffer.java:
##########
@@ -587,7 +587,7 @@ void addToCompactionLogTable(CompactionLogEntry
compactionLogEntry) {
* Check if there is any in_progress tarball creation request and wait till
* all tarball creation finish, and it gets notified.
*/
- private void waitForTarballCreation() {
+ private synchronized void waitForTarballCreation() {
Review Comment:
waitForTarballCreation wouldn't really ensure the count would be zero after
the method call. There could be a race condition here.
##########
hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/ozone/rocksdiff/RocksDBCheckpointDiffer.java:
##########
@@ -587,7 +587,7 @@ void addToCompactionLogTable(CompactionLogEntry
compactionLogEntry) {
* Check if there is any in_progress tarball creation request and wait till
* all tarball creation finish, and it gets notified.
*/
- private void waitForTarballCreation() {
+ private synchronized void waitForTarballCreation() {
Review Comment:
I believe we would need a lock on the tarballRequestCount when incrementing
and decrementing request and add the compaction log entry within the lock.
--
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]