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

Revtree repair tool gets stuck if node points to itself as parent #2919

Closed
tleyden opened this issue Sep 25, 2017 · 0 comments
Closed

Revtree repair tool gets stuck if node points to itself as parent #2919

tleyden opened this issue Sep 25, 2017 · 0 comments
Assignees

Comments

@tleyden
Copy link
Contributor

tleyden commented Sep 25, 2017

If a doc rev tree has a node that points to itself as a parent, the revtree repair tool will go into an infinite loop.

Related to #2857

@tleyden tleyden self-assigned this Sep 25, 2017
adamcfraser pushed a commit that referenced this issue Sep 25, 2017
#2920)

* Fixes #2919 Revtree repair tool gets stuck if node points to itself as parent

* PR feedback
tleyden added a commit that referenced this issue Sep 27, 2017
#2920)

* Fixes #2919 Revtree repair tool gets stuck if node points to itself as parent

* PR feedback
tleyden added a commit that referenced this issue Sep 29, 2017
#2920)

* Fixes #2919 Revtree repair tool gets stuck if node points to itself as parent

* PR feedback
tleyden added a commit that referenced this issue Oct 3, 2017
#2920)

* Fixes #2919 Revtree repair tool gets stuck if node points to itself as parent

* PR feedback
adamcfraser pushed a commit that referenced this issue 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
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

No branches or pull requests

2 participants