Repository: ignite Updated Branches: refs/heads/ignite-4932 bf0b2406d -> aa0ecf820
ignite-4932 WIP Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/aa0ecf82 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/aa0ecf82 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/aa0ecf82 Branch: refs/heads/ignite-4932 Commit: aa0ecf8203019bc2c08ede01bd7f1c91e43d5631 Parents: bf0b240 Author: sboikov <[email protected]> Authored: Thu Apr 13 13:22:06 2017 +0300 Committer: sboikov <[email protected]> Committed: Thu Apr 13 13:22:06 2017 +0300 ---------------------------------------------------------------------- .../processors/cache/GridCacheMapEntry.java | 62 ++------------------ .../cache/IgniteCacheNoSyncForGetTest.java | 10 ---- .../cache/IgniteGetFromComputeBenchmark.java | 2 +- .../IgniteOffheapGetFromComputeBenchmark.java | 28 --------- 4 files changed, 7 insertions(+), 95 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/aa0ecf82/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java index e9ec15c..d6d81de 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java @@ -140,7 +140,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme /** Value. */ @GridToStringInclude - protected volatile CacheObject val; + protected CacheObject val; /** Start version. */ @GridToStringInclude @@ -371,15 +371,10 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme } /** {@inheritDoc} */ - @Override public boolean isNewLocked() throws GridCacheEntryRemovedException { - if (val != null) - return false; - - synchronized (this) { - checkObsolete(); + @Override public synchronized boolean isNewLocked() throws GridCacheEntryRemovedException { + checkObsolete(); - return isStartVersion(); - } + return isStartVersion(); } /** @@ -472,8 +467,6 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme clearIndex(val); } - - value(null); } else { obsolete = false; @@ -874,41 +867,6 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme Object res = null; - if (readerArgs == null && - (expiryPlc == null || !expiryPlc.hasAccessTtl()) && - !isNear() && - !retVer && - cctx.config().isEagerTtl()) { - // Fast heap get without 'synchronized'. - CacheObject val0 = this.val; - - if (val0 != null) { - if (updateMetrics && cctx.cache().configuration().isStatisticsEnabled()) - cctx.cache().metrics0().onRead(true); - - if (evt && cctx.events().isRecordable(EVT_CACHE_OBJECT_READ)) { - transformClo = EntryProcessorResourceInjectorProxy.unwrap(transformClo); - - cctx.events().addEvent( - partition(), - key, - tx, - null, - EVT_CACHE_OBJECT_READ, - val0, - true, - val0, - true, - subjId, - transformClo != null ? transformClo.getClass().getName() : null, - taskName, - keepBinary); - } - - return val0; - } - } - synchronized (this) { checkObsolete(); @@ -2951,9 +2909,6 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme /** {@inheritDoc} */ @Override public boolean markObsoleteIfEmpty(@Nullable GridCacheVersion obsoleteVer) throws IgniteCheckedException { - if (val != null) - return false; - boolean obsolete = false; boolean deferred = false; GridCacheVersion ver0 = null; @@ -3094,13 +3049,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme } /** {@inheritDoc} */ - @Override public final boolean obsolete() { - if (val != null) - return false; - - synchronized (this) { - return obsoleteVersionExtras() != null; - } + @Override public final synchronized boolean obsolete() { + return obsoleteVersionExtras() != null; } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/aa0ecf82/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java index 85212c5..e4c37f4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoSyncForGetTest.java @@ -44,7 +44,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED; -import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** @@ -95,15 +94,6 @@ public class IgniteCacheNoSyncForGetTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ - public void testAtomicGet() throws Exception { - doGet(ATOMIC, ONHEAP_TIERED, false); - - doGet(ATOMIC, ONHEAP_TIERED, true); - } - - /** - * @throws Exception If failed. - */ public void testAtomicGetOffheap() throws Exception { doGet(ATOMIC, OFFHEAP_TIERED, false); http://git-wip-us.apache.org/repos/asf/ignite/blob/aa0ecf82/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetFromComputeBenchmark.java ---------------------------------------------------------------------- diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetFromComputeBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetFromComputeBenchmark.java index 580c30f..1a82fc7 100644 --- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetFromComputeBenchmark.java +++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetFromComputeBenchmark.java @@ -115,7 +115,7 @@ public class IgniteGetFromComputeBenchmark extends IgniteCacheAbstractBenchmark< * @return Cache name. */ protected String cacheName() { - return "atomic"; + return "atomic-offheap"; } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/aa0ecf82/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteOffheapGetFromComputeBenchmark.java ---------------------------------------------------------------------- diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteOffheapGetFromComputeBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteOffheapGetFromComputeBenchmark.java deleted file mode 100644 index 04a2e83..0000000 --- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteOffheapGetFromComputeBenchmark.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.yardstick.cache; - -/** - * - */ -public class IgniteOffheapGetFromComputeBenchmark extends IgniteGetFromComputeBenchmark { - /** {@inheritDoc} */ - @Override protected String cacheName() { - return "atomic-offheap"; - } -}
