ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] sk0x50 commented on a change in pull request #5656: IGNITE-10663 Read Repair
Date Wed, 10 Jul 2019 12:32:12 GMT
sk0x50 commented on a change in pull request #5656: IGNITE-10663 Read Repair
URL: https://github.com/apache/ignite/pull/5656#discussion_r302028800
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/consistency/GridNearReadRepairAbstractFuture.java
 ##########
 @@ -0,0 +1,221 @@
+/*
+ * 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.internal.processors.cache.distributed.near.consistency;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
+import org.apache.ignite.internal.cluster.ClusterTopologyServerNotFoundException;
+import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
+import org.apache.ignite.internal.processors.cache.EntryGetResult;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.IgniteCacheExpiryPolicy;
+import org.apache.ignite.internal.processors.cache.KeyCacheObject;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedGetFuture;
+import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
+import org.apache.ignite.internal.util.future.GridFutureAdapter;
+
+import static org.apache.ignite.IgniteSystemProperties.IGNITE_NEAR_GET_MAX_REMAPS;
+import static org.apache.ignite.IgniteSystemProperties.getInteger;
+
+/**
+ *
+ */
+public abstract class GridNearReadRepairAbstractFuture extends GridFutureAdapter<Map<KeyCacheObject,
EntryGetResult>> {
+    /** Default max remap count value. */
+    public static final int DFLT_MAX_REMAP_CNT = 3;
+
+    /** Maximum number of attempts to remap key to the same primary node. */
+    protected static final int MAX_REMAP_CNT = getInteger(IGNITE_NEAR_GET_MAX_REMAPS, DFLT_MAX_REMAP_CNT);
+
+    /** Remap count updater. */
+    protected static final AtomicIntegerFieldUpdater<GridNearReadRepairAbstractFuture>
REMAP_CNT_UPD =
+        AtomicIntegerFieldUpdater.newUpdater(GridNearReadRepairAbstractFuture.class, "remapCnt");
+
+    /** Remap count. */
+    protected volatile int remapCnt;
+
+    /** Affinity node's get futures. */
+    protected final Map<ClusterNode, GridPartitionedGetFuture<KeyCacheObject, EntryGetResult>>
futs = new ConcurrentHashMap<>();
+
+    /** Context. */
+    protected final GridCacheContext<KeyCacheObject, EntryGetResult> ctx;
+
+    /** Context. */
+    protected final Collection<KeyCacheObject> keys;
+
+    /** Read through flag. */
+    protected final boolean readThrough;
+
+    /** Task name. */
+    protected final String taskName;
+
+    /** Deserialize binary flag. */
+    protected final boolean deserializeBinary;
+
+    /** Recovery flag. */
+    protected final boolean recovery;
+
+    /** Expiry policy flag. */
+    protected final IgniteCacheExpiryPolicy expiryPlc;
+
+    /** Tx. */
+    protected final IgniteInternalTx tx;
+
+    /** Remap flag. */
+    private final boolean canRemap;
+
+    /** Latest mapped topology version. */
+    private AffinityTopologyVersion topVer;
+
+    /**
 
 Review comment:
   Please add java doc here and below!

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message