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
Move more functionality into sg-bucket interface and avoid type assertions #2418
Comments
I'm not against the idea of adding GetMaxVbno() to the bucket interface, but I think the check here may have just been implemented incorrectly - I think should have been this all along: |
This also should be moved into sg-bucket interface: Add to the bucket interface: sgw_pindex.go
|
Make sure all functional test post merge. |
I'm not seeing an easy way to get the bucket UUID via gocb. I posted a question on the go sdk forum: https://forums.couchbase.com/t/is-it-possible-to-get-the-bucket-uuid/12267 |
I'm looking at all the places where we need to do type assertions, and will list the ones that look like decent candidates for moving into the sg-bucket interface. GetStatsVbSeqnoIf this method:
is moved into the sg-bucket interface, then this type assertion could be removed:
|
Move GetMaxVbno() into sg-bucket interface
This code is unnecessarily brittle:
If
k.indexWriteBucket
is a*base.CouchbaseBucketGoCB
rather than abase.CouchbaseBucketGoCB
, then this code will break. So far it looks like that's what's behind couchbaselabs/mobile-testkit#1072If
GetMaxVbno()
was defined on the sg-bucket bucket interface and all buckets implemented it, it feels like it would be more robust.The text was updated successfully, but these errors were encountered: