-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CBG-4303: conflicting writes muti actor tests, skipping failures #7205
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in concept, lots of readability comments which you can think about and take or leave.
Speaking of readability, do you think it would make sense to put the different test scenarios (single actor, multi actor non conflicting, multi actor conflicting) into their own files? I can see these getting out of hand but perhaps there aren't enough tests yet to warrant that.
topologytest/hlv_test.go
Outdated
t.Run(tc.description(), func(t *testing.T) { | ||
peers, replications := setupTests(t, tc.topology, "") | ||
|
||
stopPeerReplications(t, replications) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to stop replications before creating conflicting docs? Is this because CreateDocument
can fail?
I think this is a good idea to debug tests at first but I think we'll want these writes to occur eventually while peers are active. I think this is worth marking as such and filing a followup ticket.
I think it might improve readability if we provide something like options to setupTests
to say startReplications
and activePeer
. I am a big fan of setupTestsOptions
structs so it's easy to understand what arguments like bools and strings mean.
Actually I think activePeer
might be now unused...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I'm stopping replications as the spec says to do so to create conflicting mutations. I think it makes sense at this stage to ensure we don't have timing issues etc. But I do agree we should have some concurrent updates but that maybe should be separate ticket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely a separate ticket!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed CBG-4380 for it!
CBG-4303
Pre-review checklist
fmt.Print
,log.Print
, ...)base.UD(docID)
,base.MD(dbName)
)docs/api
Integration Tests
GSI=true,xattrs=true
https://jenkins.sgwdev.com/job/SyncGateway-Integration/2812/