You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by ifesdjeen <gi...@git.apache.org> on 2018/09/07 23:12:00 UTC

[GitHub] cassandra pull request #262: Replicalayout followup

GitHub user ifesdjeen opened a pull request:

    https://github.com/apache/cassandra/pull/262

    Replicalayout followup

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/belliottsmith/cassandra replicalayout-followup

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cassandra/pull/262.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #262
    
----
commit 949ec9e9965c84c3c80daf677422acb23719212f
Author: Benedict Elliott Smith <be...@...>
Date:   2018-09-07T10:41:28Z

    [rR]eplicaLayout->[rR]eplicaPlan, selected() -> contact()

commit 8190c79d6c8bc3e1cfcc41ea0ee222fb3fc21231
Author: Benedict Elliott Smith <be...@...>
Date:   2018-09-07T10:45:28Z

    assureSufficientLiveNodes -> assureSufficientReplicas

commit 70d615f8c1831831d97582b6b526621fc3d0bbf0
Author: Benedict Elliott Smith <be...@...>
Date:   2018-09-07T11:28:01Z

    main refactor

commit 45230008ce9f12639d28b304531bd315b5637fd0
Author: Benedict Elliott Smith <be...@...>
Date:   2018-09-07T11:38:31Z

    remove get(Live)?(Sorted)?Natural(AndPending)?Replicas

commit e384d189c98877bfbf02cd8f168694bb3c012403
Author: Benedict Elliott Smith <be...@...>
Date:   2018-09-07T11:41:10Z

    fix speculation->rr_extra_read->rr_extra_write

commit f4eb2d245cf52f86fd9ef71ca2de0df3037fb3bf
Author: Benedict Elliott Smith <be...@...>
Date:   2018-09-07T11:43:00Z

    cleanup BatchLog.sendSingleReplayMutation

commit d3eb71cf3265055be739089bf34c0fed64dac24b
Author: Benedict Elliott Smith <be...@...>
Date:   2018-09-07T11:44:13Z

    fix: could speculate to nodes that would not increase consistencyLevel, resulting in timeout instead of overload

commit f59dfa83ad6de829f79406c46acc82acb84fb645
Author: Benedict Elliott Smith <be...@...>
Date:   2018-09-07T11:45:36Z

    initialise Mutable HashMap with capacity

commit 14fc69fe50178fffe6d8c0d79e60cc671aa29a88
Author: Benedict Elliott Smith <be...@...>
Date:   2018-09-07T11:47:55Z

    circleci

commit d45a68a319e488ed7ee016a747df1dfd734753bd
Author: Benedict Elliott Smith <be...@...>
Date:   2018-09-07T13:00:18Z

    comment nit

commit b49a088578292c807bc568e8a6481a7ac75fe489
Author: Benedict Elliott Smith <be...@...>
Date:   2018-09-07T13:04:17Z

    remove unused ForRangeWrite

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] cassandra pull request #262: Replicalayout followup

Posted by aweisberg <gi...@git.apache.org>.
Github user aweisberg commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/262#discussion_r216386124
  
    --- Diff: src/java/org/apache/cassandra/batchlog/BatchlogManager.java ---
    @@ -459,36 +458,31 @@ private void writeHintsForUndeliveredEndpoints(int startFrom, Set<InetAddressAnd
                 Keyspace keyspace = Keyspace.open(ks);
                 Token tk = mutation.key().getToken();
     
    +
                 ReplicaLayout.ForTokenWrite liveAndDown = ReplicaLayout.forTokenWriteLiveAndDown(keyspace, tk);
                 Replicas.temporaryAssertFull(liveAndDown.all()); // TODO in CASSANDRA-14549
     
    -            EndpointsForToken.Builder liveReplicasBuilder = EndpointsForToken.builder(tk);
    +            Replica selfReplica = liveAndDown.all().selfIfPresent();
    +            if (selfReplica != null)
    --- End diff --
    
    Looked at mutateAtomically and sendToHintedEndpoints, I guess I can see that we do have the batch log attempt to write to the coordinator. I guess that sort of makes sense in the batch log doesn't really make sense sort of way. It's possible the coordinator didn't hand the write off to itself.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] cassandra pull request #262: Replicalayout followup

Posted by ifesdjeen <gi...@git.apache.org>.
Github user ifesdjeen closed the pull request at:

    https://github.com/apache/cassandra/pull/262


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] cassandra pull request #262: Replicalayout followup

Posted by aweisberg <gi...@git.apache.org>.
Github user aweisberg commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/262#discussion_r216384748
  
    --- Diff: src/java/org/apache/cassandra/batchlog/BatchlogManager.java ---
    @@ -459,36 +458,31 @@ private void writeHintsForUndeliveredEndpoints(int startFrom, Set<InetAddressAnd
                 Keyspace keyspace = Keyspace.open(ks);
                 Token tk = mutation.key().getToken();
     
    +
                 ReplicaLayout.ForTokenWrite liveAndDown = ReplicaLayout.forTokenWriteLiveAndDown(keyspace, tk);
                 Replicas.temporaryAssertFull(liveAndDown.all()); // TODO in CASSANDRA-14549
     
    -            EndpointsForToken.Builder liveReplicasBuilder = EndpointsForToken.builder(tk);
    +            Replica selfReplica = liveAndDown.all().selfIfPresent();
    +            if (selfReplica != null)
    --- End diff --
    
    What exactly is this corner case where we have a hint written to ourselves? I thought we don't hint ourselves.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org