-
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
Adds support for custom TTL of repaired docs and ViewQueryPageSize defaults #2902
Conversation
…epairBucketParams.ViewQueryPageSize when not set
Can you recreate this PR against 1.3.1.4? |
@adamcfraser done, it was coded off release/1.3.1.4 branch, but I ended up on a detached HEAD when I pushed to GitHub. |
db/repair_bucket.go
Outdated
const ( | ||
RepairRevTreeCycles = RepairJobType("RepairRevTreeCycles") | ||
) | ||
|
||
// Params suitable for external (eg, HTTP) invocations to describe a RepairBucket operation | ||
type RepairBucketParams struct { | ||
DryRun bool `json:"dry_run"` | ||
ViewQueryPageSize int `json:"view_query_page_size"` | ||
ViewQueryPageSize *int `json:"view_query_page_size"` | ||
RepairedFileTTL *int `json:"repaired_file_ttl_seconds"` |
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.
Can we rename this to "repair_output_ttl_seconds"? As written, it sounds like the repaired file itself gets a ttl, which is a bit confusing.
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.
Modified parameter name is pushed up
…afults (#2902) Adds support for custom TTL of repaired docs and ViewQueryPageSize defaults
…afults (#2902) Adds support for custom TTL of repaired docs and ViewQueryPageSize defaults
…afults (#2902) Adds support for custom TTL of repaired docs and ViewQueryPageSize defaults
…go into infinite loop + rev tree repair tool) (#2869) * Fixes #2847 Getting doc history can go into infinite loop: Backport for 1.4.1.2 (#2858) * Fixes #2847 Getting doc history can go into infinite loop: Backport for 1.3.1.2 (#2856) * Repro case for #2847 - Getting doc history can go into infinite loop #2847 * Add revTree.Validate() method * Invoke rawDoc.History.RenderGraphvizDot(), change timeout checking * Add new test * Cherry pick commit from feature/issue_2847_cycles Cherry pick commit d8feb1d from feature/issue_2847_cycles, which is based on the master branch * Fixes issue #2847 by wwitching the dangling parent check in pruneRevisions to happen after branches are deleted #2847 (comment) * Comments on test * Fixes issue #2847 by fixing marshalJSON to better handle dangling parents during marshal #2847 (comment) * Replace getHistory with getValidatedHistory TestRevsHistoryInfiniteLoop now passes * Rename getValidatedHistory -> getHistory * Gofmt * Remove parent rev from history string * Remove unneeded fmt.Sprintf() * Run sg-accel tests * Try pointing to specific commit to fix build failure * Use git url instead of ssh for sga accel repo * Revert "Use git url instead of ssh for sga accel repo" This reverts commit 1c5e061. * Revert "Try pointing to specific commit to fix build failure" This reverts commit dd3f9d9. * Revert "Run sg-accel tests" This reverts commit d5cc940. * Remove rawDoc.History.Validate(). Does not help test catch any issues. * Remove commented log * Remove unneeded import # Conflicts: # db/revtree_test.go * Fix compile errors # Conflicts: # db/crud.go # db/revtree_test.go * Fixes #2857: Revision tree repair tool (#2866) * TestRepairRevsHistoryWithCycles() * Add Repair() — unit test passes now * Add repair bucket (in progress) * Test passes * Fix dry run * TestRepairBucketRevTreeCycles() passes * Add _repair endpoint * Fix invocation of InitFrom * Refactor RepairBucket() to return repaired docs to enable more test assertions * WriteRepairedDocsToDisk by default to make diagnosis of repair tool easier * Run gofmt + goimports * PR feedback, remove redundant repair_job * DocTransformer takes raw bytes instead of the marshalled document * Return RepairBucketResult with doc and and repair job * Update _repair endpoint to marshal result to response * Add WriteRepairedDocsToBucket(), fix super nasty dev bug along the way * Fix bug in WriteRepairedDocsToBucket() * Change to 24 hours and fix up _sync: doc id * gofmt * Return DryRun and BackupOrDryRunDocId in results * Repair() -> RepairCycles() * More test docs * Handle bucket.Update err * Add TestRepairBucketDryRun() * Use bucket.GetRaw() * Gofmt + goimports * TestRepairBucket had wrong number of docs in assertion + saw error on drone that made me think there is interference between walrus buckets w/ same name. * Fix compile error * Fix null return value when no repairs done * Change from Warn -> Crud * Disable _repair endpoint * Fix test compile errors * Fixes #2892 repair tool efficiency (#2893) * Fixes #2892 - Repair tool efficiency improvements Initial first pass at iterating over the view w/ paging * Add documentation * More comments * Comment regarding min pageSIzeViewResult * pull ViewQueryPageSize out to a constant. Enhance tests to add more docs to excercise the view iteration * Address PR feedback * Update comment * Change constant to DefaultViewQueryPageSize * Run gofmt # Conflicts: # base/constants.go # db/repair_bucket_test.go * Adds support for custom TTL of repaired docs and ViewQueryPageSize deafults (#2902) Adds support for custom TTL of repaired docs and ViewQueryPageSize defaults * correctly apply _repair parameter value for params.RepairedFileTTL (#2909) * Fixes #2919 Revtree repair tool gets stuck if node points to itself a… (#2920) * Fixes #2919 Revtree repair tool gets stuck if node points to itself as parent * PR feedback
fixes #2892