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

Adds support for custom TTL of repaired docs and ViewQueryPageSize defaults #2902

Merged
merged 3 commits into from
Sep 14, 2017

Conversation

ajres
Copy link

@ajres ajres commented Sep 14, 2017

fixes #2892

@adamcfraser
Copy link
Collaborator

Can you recreate this PR against 1.3.1.4?

@ajres ajres changed the base branch from master to release/1.3.1.4 September 14, 2017 16:08
@ajres
Copy link
Author

ajres commented Sep 14, 2017

@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.

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"`
Copy link
Collaborator

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.

Copy link
Author

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

@adamcfraser adamcfraser changed the title Adds support for custom TTL of repaired docs and ViewQueryPageSize deafults Adds support for custom TTL of repaired docs and ViewQueryPageSize defaults Sep 14, 2017
@adamcfraser adamcfraser merged commit 7c10374 into release/1.3.1.4 Sep 14, 2017
tleyden pushed a commit that referenced this pull request Sep 27, 2017
…afults (#2902)

Adds support for custom TTL of repaired docs and ViewQueryPageSize defaults
tleyden pushed a commit that referenced this pull request Sep 29, 2017
…afults (#2902)

Adds support for custom TTL of repaired docs and ViewQueryPageSize defaults
tleyden pushed a commit that referenced this pull request Oct 3, 2017
…afults (#2902)

Adds support for custom TTL of repaired docs and ViewQueryPageSize defaults
adamcfraser pushed a commit that referenced this pull request Oct 3, 2017
…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
@bbrks bbrks deleted the feature/issue_2892 branch August 1, 2019 10:18
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