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



##########
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:
       Darrel and I discussed again. We might need to re-fix it the other way: 
   
   Since the trouble is caused by offline compaction wrote totalCount=0 into 
krf, there's a potential bug that we restart with totalCount=0, but 
totalLiveCount=1, then with your current code change this oplog will never get 
a chance to compact until the only live entry is destroyed. 
   
   So a better fix maybe: when restart and found totalCount=0, then update 
totalCount to be totalLiveCount. With this fix, you don't need to change 
needsCompaction() any more. 
   
   




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