You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2019/03/05 15:55:31 UTC
[GitHub] [ignite] AMashenkov commented on a change in pull request #5995:
IGNITE-10261 MVCC: cache operation may hang during late affinity assignment.
AMashenkov commented on a change in pull request #5995: IGNITE-10261 MVCC: cache operation may hang during late affinity assignment.
URL: https://github.com/apache/ignite/pull/5995#discussion_r262559439
##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
##########
@@ -340,7 +342,14 @@ private boolean map(KeyCacheObject key, boolean forceKeys) {
if (parts == null || !F.contains(parts, part.id())) {
// By reserving, we make sure that partition won't be unloaded while processed.
if (part.reserve()) {
- if (forceKeys || (part.state() == OWNING || part.state() == LOST)) {
+ boolean mvccNoOwners = false;
+
+ // Force key request is disabled for MVCC. So if there are no partition owners for the given key
+ // we need to set flag forceKeys to true to avoid useless remapping to other non-owning partitions.
+ if (cctx.mvccEnabled())
+ mvccNoOwners = cctx.topology().owners(cctx.affinity().partition(key), topVer).isEmpty();
+
+ if (forceKeys || (part.state() == OWNING || part.state() == LOST) || mvccNoOwners) {
Review comment:
Should partition state be LOST if it has no owners?
Is additional flag really needed here?
----------------------------------------------------------------
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