[ https://issues.apache.org/jira/browse/GEODE-8665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17249072#comment-17249072 ]
ASF GitHub Bot commented on GEODE-8665: --------------------------------------- agingade commented on a change in pull request #5801: URL: https://github.com/apache/geode/pull/5801#discussion_r542497519 ########## File path: geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java ########## @@ -2225,6 +2225,12 @@ long recoverCrf(OplogEntryIdSet deletedIds, boolean recoverValues, boolean recov if (getParent().isOfflineCompacting()) { getParent().incLiveEntryCount(getRecoveryMap().size()); } + long tc = totalCount.get(); + long tlc = totalLiveCount.get(); + if (getParent().isValidating() && tlc >= 0 + && tc > tlc) { Review comment: Can there be a case where tc and tlc both are same number (including 0); in that case dead-record-counts are 0; is this valid? ---------------------------------------------------------------- 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: us...@infra.apache.org > validate offline-disk-store command is missing information > ---------------------------------------------------------- > > Key: GEODE-8665 > URL: https://issues.apache.org/jira/browse/GEODE-8665 > Project: Geode > Issue Type: Bug > Reporter: Jianxia Chen > Assignee: Jianxia Chen > Priority: Major > Labels: GeodeOperationAPI, pull-request-available > > According the document > https://geode.apache.org/docs/guide/13/managing/disk_storage/validating_disk_store.html, > `validate offline-disk-store` command should tell the number of records that > would be removed if you compacted the store. > For example, according to the document > https://geode.apache.org/docs/guide/13/managing/disk_storage/compacting_disk_stores.html: > ``` > gfsh>validate offline-disk-store --name=ds1 --disk-dirs=backupDirectory > /root: entryCount=6 > /partitioned_region entryCount=1 bucketCount=10 > Disk store contains 12 compactable records. > Total number of region entries in this disk store is: 7 > ``` > However, it does not show the number of records that would be removed if you > compacted the store. Here is how to reproduce: > 1. gfsh>create region --name=testRegion --type=PARTITION_PERSISTENT > 2. gfsh>put --key=1 --value=a --region=testRegion > 3. gfsh>put --key=1 --value=b --region=testRegion > 4. gfsh>put --key=1 --value=c --region=testRegion > 5. gfsh>shutdown > 6. gfsh>validate offline-disk-store --name=DEFAULT > --disk-dirs=/Users/jchen/workspace/geode/geode-assembly/build/install/apache-geode/server1 > expectedCrfs=[1] > expectedDrfs=[1] > dataSerializerIds=[] > instantiatorIds= [] > /testRegion entryCount=1 bucketCount=1 > Total number of region entries in this disk store is: 1 > It should have shown something like: Disk store contains 2 compactable > records. > `compact offline-disk-store` command proves that there are 2 compactable > records: > gfsh>compact offline-disk-store --name=DEFAULT > --disk-dirs=/Users/jchen/workspace/geode/geode-assembly/build/install/apache-geode/server1 > Offline compaction removed 2 records. > Cluster configuration service is not running. Configuration change is not > persisted. > `validate offline-disk-store` command could also show the wrong number of > entries. > 7. gfsh>put --key=2 --value=b --region=testRegion > 8. gfsh>remove --region=/testRegion --key=1 > 9. gfsh>validate offline-disk-store --name=DEFAULT > --disk-dirs=/Users/jchen/workspace/geode/geode-assembly/build/install/apache-geode/server1 > expectedCrfs=[1] > expectedDrfs=[1] > dataSerializerIds=[] > instantiatorIds= [] > /testRegion entryCount=2 bucketCount=2 > Total number of region entries in this disk store is: 2 > The correct number of entries should be 1, not 2. -- This message was sent by Atlassian Jira (v8.3.4#803005)