-
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-2977 allow DELETE on a broken DB config #6260
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.
I don't think the current approach works with admin auth enabled, added some suggestions about how we might address.
rest/handler.go
Outdated
return err | ||
if h.allowMetadataDBOnly { | ||
// look for db in config registry | ||
_, ok := h.server.bucketNameFromDbName(keyspaceDb) |
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.
There's some redundant work here - GetInactiveDatabase would have just done a fetchDatabase in the case where it didn't find the loaded db, and only returns 'not found' when the associated applyConfig fails, so we don't need another scan over all the buckets looking for the db config. Seems like we could modify GetInactiveDatabase to return another flag for 'dbConfigExists' that we could check here instead.
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.
One request on how we use options, otherwise looks good.
CBG-2977
LeakyBucket
andTestBucket
to supportDropDataStore
andCreateDataStore
on the assumption this test would work with walrus. It does not though, because it relies on the bootstrap connection.rest/config.go
andrest/handler.go
.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/1814/