gesterzhou commented on a change in pull request #5689:
URL: https://github.com/apache/geode/pull/5689#discussion_r519074167



##########
File path: geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java
##########
@@ -5789,9 +5789,8 @@ boolean needsCompaction() {
       if (((rv / (double) rvHWMtmp) * 100) <= parent.getCompactionThreshold()) 
{
         return true;
       }
-    } else {

Review comment:
       This fix is incorrect. It only caused the empty oplog (created by the 
offline compaction) is not deleted by the recovery's auto compaction. 
   
   I modified the dunit test a little bit and proved it. 
   
   Unfortunately, there's no flag or status to show that a compaction is just 
finished. Even we want to use the empty oplog created by offline compaction, we 
need to careful arrange the logic. Such as:
   
   change  needsCompaction to return int. 1: need to compact, -1: no need to 
compact, 0: there's one empty file,  only need to delete it.
   
   But maybe there's better ideas. 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to