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

CBG-4203 pass RevSeqNo for on demand imports #7273

Open
wants to merge 3 commits into
base: release/anemone
Choose a base branch
from

Conversation

torcolvin
Copy link
Collaborator

Pass RevSeqNo for on demand imports, write and get.

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

Integration Tests

@@ -48,6 +48,20 @@ func realDocID(docid string) string {
return docid
}

// getRevSeqNo fetches the revSeqNo for a document, using the virtual xattr if available, otherwise the document body. Returns the cas from this fetch
Copy link
Collaborator

Choose a reason for hiding this comment

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

The 'otherwise the document body' part of the comment doesn't look like it's still valid?

return 0, 0, err
}
// CBG-4233: revSeqNo not implemented yet in rosmar
if c.dbCtx.BucketSpec.IsWalrusBucket() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this check happen prior to line 53?

doc, importErr = c.OnDemandImportForGet(ctx, docid, rawBucketDoc.Body, rawBucketDoc.Xattrs, rawBucketDoc.Cas)
if importErr != nil {
return nil, nil, importErr
// reload to get revseqno
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// reload to get revseqno
// reload to get revseqno for on-demand import

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