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

Merge 2.1.1 to master #3803

Closed
wants to merge 18 commits into from
Closed

Merge 2.1.1 to master #3803

wants to merge 18 commits into from

Conversation

adamcfraser
Copy link
Collaborator

Merge 2.1.1 release fixes to master.

bbrks and others added 18 commits June 7, 2018 12:05
* Revert separation of stdout/stderr pipes (sgcollect_info doesn't use these outputs well enough to distinguish errors)

* If output_dir is not specified, find LogFilePath and write there, failing that, fall back to SG working dir, or Program Files dir on Windows

* Use LogFilePath as a fallback if no output_dir is specified for sgcollect_info

* Reduce PR scope to only #3632
* WaitForIndexRollback working

* Refactor CountQueryResults() + cleanup

* wait for index to be empty in another case

* Dump stack (overlaps w/ a PR)

* Fix TestInitializeIndexes

* Don’t wait for indexes to be empty if bucket is not flushed

* Extend DefaultWaitForSequenceTesting timeout to try to make it easier to identify cause of test failure

* Only call WaitForIndexEmpty if gocb bucket

* Fixes TestViewQueryUserAccess sporadic fail

Doesn’t seem to be fixed by WaitForIndexEmpty()

#3539 (comment)

* Fix view_undefined test failures

#3570 (comment)

* More retries

http://uberjenkins.sc.couchbase.com/view/Build/job/sync-gateway-integration-master/693/console

* Fix issue where it was printing the wrong error

* Remove the one-off retry in TestViewQueryUserAccess()

* Drop indexes if gsi indexes don’t empty

* Was missing return

* Fix loop

* Fix attempt for “bucket already open” error

* PR cleanup

* Force numIndexReplicas to be 0

* Address PR feedback

* PR feedback about when to close results

* If the view is undefined, retry

* Revert DbConfig{ UseViews: true } changes
* Repro attempt for SG #3738

* /_flush_rev_cache endpoint for easy manual testing

* TODOs on fix

* Clean up test

* First pass at implmenting norev

* Update test helper to deal with norev messages

* Translate error to status code

* Avoid panic if there is a marshal err for the sequence

* Revert "/_flush_rev_cache endpoint for easy manual testing"

This reverts commit 9e54548.

* Update test comment

* PR feedback
Previously failures persisting temporary revision backups were also blocking revision removal, resulting in malformed obsolete revision bodies remaining in the revtree in some scenarios.

Fixes #3692
* Drop verbose 'Re-syncing document' log level from Info to Debug

* Return couchbase.UpdateCancel when there's nothing to do in resync w/ xattrs

* Remove couchbase.UpdateCancel and use new base.ErrUpdateCancel instead

* Make SGError simpler by removing sgErrorCodes
* Avoid error when processing documents impacted by #3692

Fixes #3700

* Test tear-down cleanup
* Fix incorrect count from Compact when add+delete fails

* Remove documents from channel caches on _purge or _compact

* Improve _changes requqest in test to avoid races

* Fix typo in test name

* Check both channels in test

* Add TestChannelCacheRemove for testing channel cache startTime
* Seed DCP Feed from all nodes (Fixes #3756)

* Add unit test for GetStatsVbSeqno

* Add test for replica vbuckets

* Split test for lagging and non-lagging replicas
Allow import to persist a temporary backup of the previous revision body, when it's available via the rev cache.

Given the additional import/DCP work involved (an additional rev cache lookup and kv op per imported document), this is an opt-in feature, enabled using import_backup_old_rev config property.
Ensure that low sequence is preserved across longpoll requests, to avoid missed changes when system low sequence changes between longpoll iterations.
* Add experimental dockerfile

* Fix attempt for build err

* Trying to figure out how to get source commit/branch

* Revert "Trying to figure out how to get source commit/branch"

This reverts commit bd5e502.

* Add artificial delay after getting last seq, but before starting dcp feed

* Reload c.initialSequence in DocChanged() as long as c.initialSequenceLazyLoaded == false

* Notes from call w/ Adam

* Add c.getInitialSequence() + _getNextSequence()

* Fixes

* Add comments

* Notes from call w/ Adam

* Sketch out changes and test

* Change the changeindex iface

* Fix data race

WARNING: DATA RACE
Write at 0x00c4201fa2e0 by goroutine 9:
  github.com/couchbase/sync_gateway/db.(*changeCache)._addToCache()
      /drone/godeps/src/github.com/couchbase/sync_gateway/db/change_cache.go:689 +0x4ff
  github.com/couchbase/sync_gateway/db.(*changeCache).processEntry()
      /drone/godeps/src/github.com/couchbase/sync_gateway/db/change_cache.go:650 +0x1f6
  github.com/couchbase/sync_gateway/db.(*changeCache).DocChangedSynchronous()
      /drone/godeps/src/github.com/couchbase/sync_gateway/db/change_cache.go:549 +0x20a4

Previous read at 0x00c4201fa2e0 by goroutine 42:
  github.com/couchbase/sync_gateway/db.(*changeCache).waitForSequence()
      /drone/godeps/src/github.com/couchbase/sync_gateway/db/util_testing.go:25 +0xbd
  github.com/couchbase/sync_gateway/db.TestDocDeletionFromChannelCoalesced()
      /drone/godeps/src/github.com/couchbase/sync_gateway/db/changes_test.go:233 +0x5fe
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:746 +0x16c

* Use getNextSequence() in a few more places

* Fix another race

https://gist.github.com/tleyden/dccaa3cf2be85160051a793333c24467

* Remove dockerfile, moved to a separate PR

* Gofmt

* PR cleanup

* PR cleanup

* Remove check that’s leftover from first attempt

* Add comments

* First round of PR feedback

* Address PR feedback about avoiding external locking
@coveralls
Copy link

Coverage Status

Coverage decreased (-8.2%) to 51.816% when pulling fea9947 on release/2.1.1 into f9425d4 on master.

@bbrks
Copy link
Member

bbrks commented Oct 19, 2018

Happy to walk through this on a call if you need a second pair of eyes dealing with the conflicts.

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.

None yet

4 participants