first range replication never succeeds
This can be seen in the TestRangeReplication acceptance test. Run using TESTS=RangeReplication acceptance/run.sh. Every once in a while the test will hang after finding 2 replicas. Still trying to piece together what is going on. Looks like something is going wrong with gossip. All 3 nodes are complaining about:
W0529 16:58:45.168017 1 gossip.go:483] missing sentinel gossip 1; assuming partition and reconnecting
That might be a red-herring, though. Early in the logs I'm seeing errors like:
E0529 16:52:39.105180 1 range_command.go:395] InternalRangeLookup dispatched to correct range, but no matching RangeDescriptor was found. key range "\x00\x00meta1\xff\xff"-"" outside of bounds of range ""-"\xff\xff"
https://github.com/cockroachdb/cockroach/pull/1171/files
might fix the error log you are seeing. On Fri, May 29, 2015 at 1:08 PM Peter Mattis [email protected] wrote:
This can be seen in the TestRangeReplication acceptance test. Run using TESTS=RangeR eplication acceptance/run.sh. Every once in a while the test will hang after finding 2 replicas. Still trying to piece together what is going on. Looks like something is going wrong with gossip. All 3 nodes are complaining about:
W0529 16:58:45.168017 1 gossip.go:483] missing sentinel gossip 1; assuming partition and reconnecting
That might be a red-herring, though. Early in the logs I'm seeing errors like:
E0529 16:52:39.105180 1 range_command.go:395] InternalRangeLookup dispatched to correct range, but no matching RangeDescriptor was found. key range "\x00\x00meta1\xff\xff"-"" outside of bounds of range ""-"\xff\xff"
— Reply to this email directly or view it on GitHub https://github.com/cockroachdb/cockroach/issues/1193.
Do you have a full log for this @petermattis? If you can reproduce it, see if it goes away if you set multiraft.EventBufferSize to (say) 1000. If that fixes it, then you've likely got #1185 on two nodes, preventing a working first range and thus gossiping.
@tschottdorf It is very reproducible. I just run while :; do go test -v -tags acceptance -run RangeReplication; done until it hangs. Do you want me to grab logs? Any particular -vmodule settings?
Let me see if I can just get it here.
Ok. I'm trying to reproduce with the following patch applied:
diff --git a/storage/store.go b/storage/store.go
index 7d8055a..d6fffdb 100644
--- a/storage/store.go
+++ b/storage/store.go
@@ -419,6 +419,7 @@ func (s *Store) Start(stopper *util.Stopper) error {
TickInterval: s.ctx.RaftTickInterval,
ElectionTimeoutTicks: s.ctx.RaftElectionTimeoutTicks,
HeartbeatIntervalTicks: s.ctx.RaftHeartbeatIntervalTicks,
+ EventBufferSize: 1000,
EntryFormatter: raftEntryFormatter,
}, s.stopper); err != nil {
return err
FYI, it can can a dozen or so runs for the problem to occur.
I'm well above 100 runs on current master without getting this. Must be Your Magic Machine(TM). Let's see if the diff above makes it disappear. That would be a fairly clear indication if it's otherwise reproducible.
It's running fine for me with the patch. Let me try without the patch to verify I can reproduce.
Ok, reproduced again without the patch. Took 71 runs. Going to leave it running with the patch again.
With the patch I've completed 507 successful runs. Seems pretty clear that the raft deadlock was the problem.
Cool. Wanna close this in favor of #1185?