Skip to content
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

Skip all docs index creation for new deployment #5993

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

nirav24
Copy link
Contributor

@nirav24 nirav24 commented Dec 22, 2022

CBG-0000

Describe your PR here...

  • When starChannel is not enable, we do not create allDocs index anymore
  • Returns error message when _all_docs endpoint is called but allDocs index doesn't exist because starChannel was disabled

Pre-review checklist

  • Removed debug logging (fmt.Print, log.Print, ...)
  • Logging sensitive data? Make sure it's tagged (e.g. base.UD(docID), base.MD(dbName))
  • Updated relevant information in the API specifications (such as endpoint descriptions, schemas, ...) in docs/api

Dependencies (if applicable)

  • Link upstream PRs
  • Update Go module dependencies when merged

Integration Tests

@nirav24 nirav24 force-pushed the skip-all-docs-index-creation-for-new-deployment branch 3 times, most recently from fd27cca to b773173 Compare December 27, 2022 16:24
@nirav24 nirav24 force-pushed the skip-all-docs-index-creation-for-new-deployment branch from 857e72b to 97c1780 Compare January 10, 2023 20:15
@@ -329,7 +329,7 @@ func filterViewResult(input sgbucket.ViewResult, user auth.User, applyChannelFil
// Is any item of channels found in visibleChannels?
func channelsIntersect(visibleChannels ch.TimedSet, channels []interface{}) bool {
for _, channel := range channels {
if visibleChannels.Contains(channel.(string)) || channel == "*" {
if visibleChannels.Contains(channel.(string)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamcfraser please confirm removing this or condition is okay. I don't understand why the * channel was checked in the first place. This fixes rest/TestUserViewQuery test which was getting 2 documents but was expecting just one.

@nirav24 nirav24 force-pushed the skip-all-docs-index-creation-for-new-deployment branch 2 times, most recently from b0592c5 to cca6101 Compare January 12, 2023 19:21
@nirav24 nirav24 force-pushed the skip-all-docs-index-creation-for-new-deployment branch from 9a707f5 to 1aac440 Compare January 19, 2023 19:55
@nirav24 nirav24 force-pushed the skip-all-docs-index-creation-for-new-deployment branch from 1fda8d5 to 3af6e46 Compare January 25, 2023 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants