geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject incubator-geode git commit: fixed dataStoreEntryCount with tombstones in copyRecoveredEntries
Date Fri, 05 Aug 2016 00:13:07 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-1714 19db65842 -> 77bb85dec


fixed dataStoreEntryCount with tombstones in copyRecoveredEntries


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/77bb85de
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/77bb85de
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/77bb85de

Branch: refs/heads/feature/GEODE-1714
Commit: 77bb85dec2c12b1c7aa4730ab96983cf8c790e02
Parents: 19db658
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Thu Aug 4 16:55:51 2016 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Thu Aug 4 16:55:51 2016 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/internal/cache/AbstractRegionMap.java  | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/77bb85de/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
index 9148119..a0fe594 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
@@ -574,8 +574,9 @@ public abstract class AbstractRegionMap implements RegionMap {
           if (newRe.isTombstone()) {
             VersionTag tag = newRe.getVersionStamp().asVersionTag();
             tombstones.put(tag, newRe);
+          } else {
+            _getOwner().updateSizeOnCreate(key, _getOwner().calculateRegionEntryValueSize(newRe));
           }
-          _getOwner().updateSizeOnCreate(key, _getOwner().calculateRegionEntryValueSize(newRe));
           incEntryCount(1);
           lruEntryUpdate(newRe);
         } finally {
@@ -587,20 +588,20 @@ public abstract class AbstractRegionMap implements RegionMap {
         lruUpdateCallback();
       }
     } else {
-      incEntryCount(size());
       for (Iterator<RegionEntry> iter = regionEntries().iterator(); iter.hasNext();
) {
         RegionEntry re = iter.next();
         if (re.isTombstone()) {
           if (re.getVersionStamp() == null) { // bug #50992 - recovery from versioned to
non-versioned
-            incEntryCount(-1);
             iter.remove();
             continue;
           } else {
             tombstones.put(re.getVersionStamp().asVersionTag(), re);
           }
+        } else {
+          _getOwner().updateSizeOnCreate(re.getKey(), _getOwner().calculateRegionEntryValueSize(re));
         }
-        _getOwner().updateSizeOnCreate(re.getKey(), _getOwner().calculateRegionEntryValueSize(re));
       }
+      incEntryCount(size());
       // Since lru was not being done during recovery call it now.
       lruUpdateCallback();
     }


Mime
View raw message