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

Release/2.8.2 #2

Open
wants to merge 571 commits into
base: mz2/multicookie
Choose a base branch
from
Open
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Mar 19, 2020

  1. CBG-716: Fail on unknown fields on config PUT (#4536)

    * CBG-716: Fail on unknown fields on config PUT
    
    * Basic test
    JRascagneres committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    cec9aca View commit details
    Browse the repository at this point in the history
  2. : Reliably flush to console on Fatalf (#4537)

    * CBG-758: Reliably flush to console on Fatalf
    
    * Switch waitgroup to pointer
    
    * Fix typo
    JRascagneres committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    962ff96 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2020

  1. Configuration menu
    Copy the full SHA
    8ed74f7 View commit details
    Browse the repository at this point in the history
  2. CBG-724: Deletions of empty documents are not imported (#4531)

    * CBG-724: Deletions of empty documents are not imported
    
    * CBG-724: Deletions of empty documents are not imported
    When the document is a delete, the bodyBytes would be replaced with “{}” and we can’t use bodyBytes in CRC-32 checksum comparison to determine whether the mutation was an SG write and the document has already been imported. Need to set the current value of CRC-32 checksum from bodyBytes when the document is non-delete and revert back to the correct CRC-32 checksum “0x00” before we replace the bodyBytes otherwise (if the document is delete).
    
    * CBG-724: Deletions of empty documents are not imported
    - Added additional unit tests (TestUpdateXattrWithDeleteBodyAndIsDelete, TestUpdateXattrWithDeleteBodyAndIsNotDelete) in bucket_gocb_test.go to validate the new behaviour of UpdateXattr.
    - Refactored XattrMacroCrc32cDelete to DeleteCrc32c and added short comment describes what it represents.
    - Removed obsolete comments left over from working session; added a brief description about the situation and need to modify currentBodyCrc32c in the delete case.
    sarathkumarsivan committed Mar 20, 2020
    Configuration menu
    Copy the full SHA
    136e54a View commit details
    Browse the repository at this point in the history
  3. Fix for unresolved reference to err variable introduced as part of co…

    …mmitting TestDeletedEmptyDocumentImport along with CBG-724. (#4539)
    sarathkumarsivan committed Mar 20, 2020
    Configuration menu
    Copy the full SHA
    1bb9da2 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2020

  1. Configuration menu
    Copy the full SHA
    f1a2584 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2020

  1. CBG-752: SGCollect avoid unnecessary unzip (#4541)

    * CBG-752: SGCollect avoid unnecessary unzip
    
    * Address PR comments
    JRascagneres committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    8084478 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2020

  1. CBG-812 - Fixes infinite loop caused by stale view query when running…

    … compact (#4544)
    
    * CBG-812 - Fixes infinte loop caused by stale view query when running compact
    
    * Use consistency param
    
    * Remove stale parameter and hardcode
    bbrks committed Apr 1, 2020
    Configuration menu
    Copy the full SHA
    759cf17 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2020

  1. Configuration menu
    Copy the full SHA
    86c4c4c View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2020

  1. CBG-625 - Integration Test Bucket Pooling (#4493)

    This speeds up full integration test runs significantly, by moving the
    bucket setup/teardown into an async worker which gets buckets ready in
    the background while tests are running using a different bucket.
    
    ## Usage:
    
    ```
    export SG_TEST_BACKING_STORE=Couchbase
    export SG_TEST_COUCHBASE_SERVER_URL=couchbase://localhost
    go test -v -p=1 -count=1 ./...
    ```
    
    ### Configuration
    #### Existing
    - `SG_TEST_BACKING_STORE` (default `Walrus`)
    	- Can be set to `Couchbase` to enable integration tests
    - `SG_TEST_COUCHBASE_SERVER_URL` (default `http://localhost:8091`)
    	- The connection string to connect with Couchbase Server
    
    #### New
    - `SG_TEST_USERNAME` (default `"Administrator"`)
    	- The username to use when connecting to the test server
    - `SG_TEST_PASSWORD` (default `"password"`)
    	- The password to use when connecting to the test server
    - `SG_TEST_BUCKET_POOL_SIZE` (default `3`)
        - Specify how many buckets to create and use.
    - `SG_TEST_BUCKET_QUOTA_MB` (default `150`)
        - Specify how many MB each bucket's RAM quota should be
    - `SG_TEST_BACKING_STORE_RECREATE` (default `false`)
        - Drops any existing test buckets, and creates new ones
        before continuing to add them to the pool. If this is
        not set, previous buckets are just readied as normal.
    - `SG_TEST_BUCKET_POOL_PRESERVE` (default `false`)
    	- In the event of a failing test, the bucket used is not emptied
    	and put back into the pool. This may result in exhaustion of
    	buckets if more tests fail than the pool size.
    - `SG_TEST_BUCKET_POOL_DEBUG` (default `false`)
        - If "true", verbose bucket pool logging is turned on,
        to see what is happening to each bucket whilst running.
    - `SG_TEST_DISABLE_GSI`
    	- Always set to true until CBG-818
    
    ---
    
    * CBG-625 - Add bucket pooling test framework.
    
    * Simplify LoggingBucket log code, and include bucket name in log context
    
    * Prevent test failures when using walrus buckets
    
    * Check for TestBucket pointer in AsGoCBBucket
    
    * Fix WaitGroup data race by incrementing counter before sending bucket over bucketReadierQueue
    
    * Prevent data race with multiple concurrent cluster.Authenticate() calls by using a pre-authed cluster reference
    
    * Fix data race around initialisation of bucketReadierWaitGroup
    
    * Add getTestKeyNamespace to force unique doc IDs for xattr tests (avoids KV tombstone issues)
    
    * Increase timeout on retry loop for WaitForNumDocsViaChanges
    
    * Bump gocb/gocbcore for cluster ops pre-bucket open
    
    * Add SG_TEST_USE_VIEWS flag, but force it to be true all the time until 6.5.1
    
    * Fix TestQuerySequencesStatsN1ql bucket type/view check
    
    * Use TestsUseViews in RestTester setup
    
    * Avoid vet catching unreachable code
    
    * Use TestsUseViews for ServerContext test
    
    * rename TestsUseViews to TestsDisableGSI and use in PostUpgrade
    
    * Handle View and Query stats in TestTombstoneCompaction
    
    * Bump bucket pool size from 100MB to 150MB
    
    * Parameterise bucket quota
    
    * Improve comments, rename things to be TBP scoped, rearrange to tidy
    
    * More cleanup
    
    * Tweak values in TestAddRawTimeoutRetry to avoid exceeding 150MB bucket quota, whilst still reproducing issue
    
    * Add retry loop around UpsertDesignDocument to handle sporadic Erlang 500 errors
    
    * Bump sg-bucket/walrus revisions
    
    * Handle non-nil empty error from gocb's GetBuckets for 401 status code
    
    * Add SG_TEST_USERNAME/SG_TEST_PASSWORD env vars
    
    * Add benchmark for GetCallersName
    
    * Skip printStats if no buckets opened (e.g. benchmarks)
    
    * Remove unused GetTestBucketSpec
    
    * Remove alignment chars from test logging
    
    * Add comments for unused functions
    
    * Drop default test pool size to 3
    
    * Use t.Name() from getTestKeyNamespace
    
    * Simplify document keys in single-doc tests
    
    * Remove unnesesary query result Close
    
    * Clean up TestBucketPool naming/API
    
    * Move primary index creation out into test-only code
    
    * Make mockClaims expire far into the future
    
    * Fix missed InitializeIndex paramter removal
    
    * Refer to global TestBucketPool from db TestMain
    
    * Unskip TestPostUpgradeIndexesSimple
    bbrks committed Apr 8, 2020
    Configuration menu
    Copy the full SHA
    b530db3 View commit details
    Browse the repository at this point in the history
  2. CBG-763 Avoid race in cache compaction start (#4548)

    Switch to compareAndSwap when toggling compactRunning on channelCacheImpl
    adamcfraser committed Apr 8, 2020
    Configuration menu
    Copy the full SHA
    2b5c83f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1a92d84 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2020

  1. CBG-808: Add LiteCore tests (#4546)

    * CBG-808: Add LiteCore tests
    JRascagneres committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    f61cd2c View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2020

  1. CBG-814 Do not prepend filtered query results to channel cache (#4554)

    The change to include the active-only criteria in the N1QL query, instead of post-cache retrieval filtering, resulted in invalid cache contents. Active-only query results should not be cached.
    adamcfraser committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    d95a0d3 View commit details
    Browse the repository at this point in the history
  2. CBG-825: Allow session create with invalid session (#4555)

    * CBG-825: Allow session create with invalid session
    
    * Clarify comments
    
    * Switch to use publicPrivs
    JRascagneres committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    6b97c31 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2020

  1. Configuration menu
    Copy the full SHA
    39bc492 View commit details
    Browse the repository at this point in the history
  2. CBG-801: Auto-generated OIDC callback URL should include provider whe…

    …n non-default (#4551)
    
    * CBG-801: Auto-generated OIDC callback URL should include provider when non-default
    
    * CBG-801: Added changes to handle updating the provider value
    
    * CBG-801: Updated the error code returned by failures to set parameters to URL query string
    
    * CBG-801: Added changes in getOIDCCallbackURL to use SetURLQueryParam while building the callback URL
    
    * CBG-801: Changes track URL parsing errors and test case for provider name that would need URL encoding.
    - Added test case for a provider name that would need URL encoding.
    - Added changes to track underlying error
    
    * Fixed issue in adding provider to callback URL and included Unit tests
    
    * CBG-801: Handle error when writing mocked response body for discovery endpoints in TestGetOIDCCallbackURL
    
    * CBG-801: Revised getOIDCCallbackURL to remove nesting if clauses while building the callback URL.
    sarathkumarsivan committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    6862817 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2020

  1. CBG-821 Query limit for channel queries (#4557)

    Adds query pagination for channel queries triggered by changes processing.
    Default query limit for pagination is 5000, and can be modified with
    a new ‘query_limit’ config property in channel cache config.
    
    Pagination is done while building the per-channel feed (go-channel).
    This avoids storing the entire cross-query resultset in memory,
    allows streaming of results as soon as the first query completes,
    and optimizes interaction with any changes request limit.
    
    This has implications for cache warming - only the last (query_limit) entries
    will be prepended to the cache per changes request.
    adamcfraser committed Apr 28, 2020
    Configuration menu
    Copy the full SHA
    c2fbffd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6b08317 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2020

  1. Configuration menu
    Copy the full SHA
    f6b5966 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2020

  1. Configuration menu
    Copy the full SHA
    0a64ba8 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2020

  1. Configuration menu
    Copy the full SHA
    a4880c8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8071457 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ac2ee20 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    21975e2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    26527ca View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a28e28f View commit details
    Browse the repository at this point in the history

Commits on May 7, 2020

  1. Configuration menu
    Copy the full SHA
    4fa7d54 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2020

  1. Configuration menu
    Copy the full SHA
    82489a3 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2020

  1. Replace GetTestKeyNamespace with t.Name (#4572)

    * Make GetTestKeyNamespace public
    
    * Remove getTestKeyNamespace(t) in favour of t.Name()
    bbrks committed May 13, 2020
    Configuration menu
    Copy the full SHA
    8c57c2b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    029eae4 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2020

  1. Configuration menu
    Copy the full SHA
    c1674e6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    717fe5f View commit details
    Browse the repository at this point in the history

Commits on May 15, 2020

  1. Add x509 test framework and happy-path rountrip write tests (#4579)

    * Expose pool bucket cred methods
    
    * Add x509 test framework
    
    * Split into util and tests file
    
    * configurable SSH username
    
    * Enable optional X.509 Client certs in CBS, skip failing CBG-844 test
    
    * Ignore errors from resp.Body.Close()
    
    * clarify error messages
    
    * Undo node rename approach, enforce tests have required hostname set before running
    
    * Fix default port handling
    
    * Adopt comments from #4577 into here, and remove unused function
    
    * assert on error returned from teardown
    
    * Rename the basic auth REST API URL helper
    
    * Tweak comments for couchbaseNodeConfiguredHostname
    bbrks committed May 15, 2020
    Configuration menu
    Copy the full SHA
    c2d2869 View commit details
    Browse the repository at this point in the history
  2. Verification of new OIDC coverage against the old library (#4575)

    * Add go-jose.v2 for fixing the build failure and running the coverage
    
    * Resolve merge conflicts in base/util_testing.go
    
    * Verification of new OIDC coverage against the old library
    
    * oidc-coverage: Add wantError struct to assert the response
    
    * oidc-coverage: Change token expiry assertion
    
    * oidc-coverage: Add forceAuthError, forceRefreshError fields in the test struct and remove the switch conditional processing.
    - Additional functions to return a provider in the give name with different settings; mockProvider, mockProviderWithRegister, mockProviderWithRegisterWithAccessToken.
    - Remove 'mock' prefix on the function names (e.g. this can just be discoveryHandler, authHandler, tokenHandler), to remove redundancy and ambiguity.
    - Revise code comments
    - Rename 'wantError' to 'forceError' and 'wantErrKind' to 'forceErrorType'.
    
    * oidc-coverage: Change error message text to handle 'no such host' and 'i/o timeout' error
    
    * oidc-coverage: Remove TestFetchCustomProviderConfigWithBadURL; it doesn't add any value
    
    * oidc-coverage: Additional unit tests that covers registered user authentication
    sarathkumarsivan committed May 15, 2020
    Configuration menu
    Copy the full SHA
    97930a9 View commit details
    Browse the repository at this point in the history

Commits on May 19, 2020

  1. Configuration menu
    Copy the full SHA
    039182b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1d5b30d View commit details
    Browse the repository at this point in the history

Commits on May 20, 2020

  1. Configuration menu
    Copy the full SHA
    0617d01 View commit details
    Browse the repository at this point in the history
  2. CBG-804: OpenID Connect Library Upgrade (#4581)

    * CBG-804: OpenID Connect Library Upgrade
    
    * CBG-804: Fix status codes to handle errors in auth and refresh scenarios
    - Remove gocbconnstr dependency changes committed against this PR from manifest file.
    - Remove client ID empty check which is obsolete.
    - Return status 500 internal server error when there is any failure in auth/refresh token exchange.
    - Return status 401 unauthorized error when no token_id is received from OAuth server in auth/refresh responses.
    - Fix the token expiration time sent from fake OAuth server and correct the assertion logic.
    
    * CBG-804: Status response correction against token exchange and auth failure scenarios
    
    * CBG-804: Check the token expiry is within 5 seconds of the expected value for auth and refresh responses
    sarathkumarsivan committed May 20, 2020
    Configuration menu
    Copy the full SHA
    0674d5e View commit details
    Browse the repository at this point in the history

Commits on May 21, 2020

  1. Configuration menu
    Copy the full SHA
    368de03 View commit details
    Browse the repository at this point in the history
  2. CBG-877: Remove inappropriate logging warning related JSON parsing fr…

    …om ReadJSONFromMIME when request body is empty (#4587)
    sarathkumarsivan committed May 21, 2020
    Configuration menu
    Copy the full SHA
    790d3da View commit details
    Browse the repository at this point in the history

Commits on May 22, 2020

  1. CBG-876: Include Bearer prefix when sending token base authentication… (

    #4586)
    
    * CBG-876: Include Bearer prefix when sending token base authentication request in OIDC E2E tests
    - Move getRSASigner() from util_testing.go to oidc_test.go.
    - Include Bearer prefix when sending token base authentication request in OIDC E2E tests.
    - Attach public keys and signer to the mockAuthServer.
    - Add keysHandler to expose the public keys to validate a JSON Web Token (JWT) issued.
    - Include makeToken method on mockAuthServer to creates a default token.
    - E2E test that checks OpenID Connect Implicit Flow.
    
    * CBG-876: Fix the assertion error message "session expiry is not within 5 seconds of 24 hours"
    
    * CBG-876: Refactor makeToken and include additional coverage
    - Add comments against BearerToken stating that it is used for setting JWT token type as well as the prefix for the Authorization HTTP header.
    - Refactor makeToken method to keep one property per line while building the claims for making auth token.
    - Yeah, Last time the it was falling under the Guest user flow instead of validating the Bearer token and since the Guest user has access to everything, it was not complaining about any "login issue" inside checkAuth(), returning a successful response from db endpoint and eventually all those tests got succeeded. After adding the changes for sending Bearer token, I've gone through the E2E workflow and confirmed that the JWT token we are sending during Implicit Flow is undergoing successful validation. But when I was going through this review comments, I did realize that the test require an additional fix that is disabling the Admin Party when spinning up the fake SG server at the start of the test. This will cover the negative scenario; the test will fail if we send a valid token with "Bearer " prefix.
    - Refactor getCookie function to use enhanced for loop.
    - Since we're already checking whether the DefaultCookieName exists, skip the check for kDefaultSessionTTL and make sure the response body has the expected details like username, channels, authentication_handlers etc.
    - Refactor makeToken method to accept claimSet which contains both primary and secondary claims to make it convenient to adjust claims from the caller for specific use cases.
    - Include additional unit test cases to cover the edge cases.
    sarathkumarsivan committed May 22, 2020
    Configuration menu
    Copy the full SHA
    799a906 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2020

  1. CBG-779: Add ActiveReplicator APIs and implement blipsync (#4588)

    * Pull shared BLIP code into new replicator package
    
    * CBG-779 and CBG-780: Add ActiveReplicator APIs and implement blipsync
    
    * Add basic ActiveReplicator test
    
    * Remove sleep, defer Close()
    
    * Use public REST API with user and rename test
    
    * Remove old comment (and try to force GitHub to update the PR)
    
    * Address PR comments
    
    * Automatically connect to target on ActiveReplicator Start
    bbrks committed May 26, 2020
    Configuration menu
    Copy the full SHA
    d49174d View commit details
    Browse the repository at this point in the history

Commits on May 27, 2020

  1. CBG-770-prereq Refactor heartbeater to support multiple listeners (#4590

    )
    
    * CBG-770-prereq Refactor heartbeater to support multiple listeners
    
    The existing heartbeat implementation was tightly coupled with a single listener (cbgt).  Refactored to support sharing of a single heartbeater among multiple listeners. Simplified heartbeater interface to better encapsulate functionality.
    
    For shared heartbeat, a common node ID needs to be used for both heartbeater and its listeners - moved this from cbgt up to databaseContext.
    
    * Cleanup/fixes based on PR feedback
    adamcfraser committed May 27, 2020
    Configuration menu
    Copy the full SHA
    d406a56 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    216dd52 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b5f50c7 View commit details
    Browse the repository at this point in the history
  4. CBG-820: Add state for OIDC auth code authentication (#4582)

    * CBG-820: Maintain state between the OpenID Connect authentication request and the callback
    
    - Add disable_callback_state option to determines whether or not to maintain state between the Authentication request and the callback.
    - Add callback_state_cookie_http_only to determine whether or not to make the callback state cookie inaccessible to JavaScript's - - Document.cookie API to mitigate cross-site scripting (XSS) attacks.
    - Add 'sg-oidc-state' cookie to maintain the state token with a duration of 5 minutes.
    - Introduce ErrNoStateCookie, ErrStateMismatch, ErrReadStateCookie errors for callback state error handling.
    - Set state parameter to prevent cross-site request forgery (CSRF) when DisableCallbackState is not enabled.
    - Validate state parameter to prevent cross-site request forgery (CSRF) when callback state is enabled.
    - Delete the state cookie on successful state validation.
    - Add an error type invalidStateErr to force the /auth API to return an invalid state token in the callback URL for unit testing.
    - Add cookieJar to HttpClient instance to insert relevant cookies into every outbound Request and update it with the cookie values of every inbound Response.
    - Add coverage for the following scenarios:
      - Successful new user authentication with HttpOnly cookie enabled.
      - Successful new user authentication with HttpOnly cookie enabled.
      - Successful new user authentication with callback state disabled.
      - Unsuccessful new user authentication against CSRF attack.
      - Successful registered user authentication with HttpOnly cookie enabled.
      - Successful registered user authentication with callback state disabled.
      - Unsuccessful registered user authentication against CSRF attack.
    
    * CBG-820: Fix the comments over written while resolving merge conflict on rebase against master
    
    * CBG-820: make the callback state cookie always inaccessible to JavaScript's Document.cookie API
    
    * CBG-820: Refactor setSateCookie method and rename to makeStateCookie
    sarathkumarsivan committed May 27, 2020
    Configuration menu
    Copy the full SHA
    be858d5 View commit details
    Browse the repository at this point in the history

Commits on May 28, 2020

  1. CBG-800: OnDemandImportForWrite migrate handling (#4553)

    * CBG-800: OnDemandImportForWrite migrate handling
    
    * Address PR comments
    
    * Fix test and added check
    
    * Better sync property check
    
    * Address PR comments
    
    * Reworked handling
    
    * Work on test
    
    * Run callback once
    
    * Temporary PoC test
    
    * Move test to use leaky bucket
    
    * Upgrade logging for paniced test
    
    * Rollback logging change
    
    * Address PR comments
    
    * Update manifest
    JRascagneres committed May 28, 2020
    Configuration menu
    Copy the full SHA
    2d24bb0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    27f9b31 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2020

  1. Configuration menu
    Copy the full SHA
    261e857 View commit details
    Browse the repository at this point in the history
  2. Add project-wide golangci-lint config (#4598)

    * Add golangci-lint config file
    
    * Disable goconst linting in test files
    bbrks committed May 29, 2020
    Configuration menu
    Copy the full SHA
    8db1a1f View commit details
    Browse the repository at this point in the history
  3. Heartbeat registration and dropped node handling for sg-replicate (#4597

    )
    
    Moves heartbeater initialization to database, and shares use between sg-replicate and import.  Includes addition of sgreplicate_enabled config property to allow nodes to opt out of sgreplicate.
    adamcfraser committed May 29, 2020
    Configuration menu
    Copy the full SHA
    7b564d9 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2020

  1. CBG-783-prereq-2a: Move REST-specific code out of generateChanges (#4594

    )
    
    * Refactor generateChanges to move REST handler-specific handling out into h.generateContinuousChanges
    
    * Switch blip generateChanges context to TODO
    
    * Ignore typed error for changes send errors
    bbrks committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    0f36717 View commit details
    Browse the repository at this point in the history
  2. CBG-783-prereq-3: Move blipSyncContext into replicator package (#4595)

    * Move blipSyncContext into replicator package
    
    * Pull latest changes from #4594
    bbrks committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    5c17e6c View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2020

  1. Configuration menu
    Copy the full SHA
    72b2092 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2020

  1. CBG-783: Initial SGR2 pull replication implementation (#4599)

    * SGR2: Initial pull replication
    
    * Rename BlipSyncContext context ID parameter
    
    * Minor tidy of unused struct field
    
    * Simplify by only setting blipSyncContext field
    
    * Use db.SequenceID type instead of uint64 for ActiveReplicator since
    
    * Add all missing subChanges params, and Rename BidirectionalActiveReplicator to ActiveReplicator
    
    * Rename PassiveDB to PassiveDBURL
    
    * Rename variables for consistency after Struct/Field renames
    bbrks committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    25ddd61 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    97be2da View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    354828f View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2020

  1. CBG-893 Expand waitForIndex for more error cases (#4605)

    * Expand waitForIndex for more error cases
    
    Modifies waitForIndex to retry on all errors.  Indefinite retry for timeouts, backoff retry for all other errors.
    
    * Reduce max retry for a better balance of SG retry and service retry.
    adamcfraser committed Jun 5, 2020
    Configuration menu
    Copy the full SHA
    4e4adcd View commit details
    Browse the repository at this point in the history
  2. Reenable test active replicator pull basic (#4606)

    * Reenable TestActiveReplicatorPullBasic
    
    * Bump go-blip manifest
    
    * Update manifest/default.xml
    bbrks committed Jun 5, 2020
    Configuration menu
    Copy the full SHA
    47ac8dd View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2020

  1. Configuration menu
    Copy the full SHA
    21569cd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    38fd9f3 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2020

  1. Configuration menu
    Copy the full SHA
    5b4a7a6 View commit details
    Browse the repository at this point in the history
  2. Improve callback state cookie error handling and notify clients to su…

    …pport cookies when OIDC callback state is enabled. (#4611)
    sarathkumarsivan committed Jun 9, 2020
    Configuration menu
    Copy the full SHA
    a3c27c9 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2020

  1. Configuration menu
    Copy the full SHA
    a3e81d9 View commit details
    Browse the repository at this point in the history
  2. CBG-782 - Add pull replicator checkpointing (#4613)

    * Send getCheckpoint to set since sequence before starting pull replication
    
    * Handle checkpointing from ActivePullReplicator
    
    * minor test tidy up
    
    * Add pull replicator checkpointing
    
    * Implement checkpoint ID hash
    
    * Bump walrus manifest for PR branch
    
    * Bump walrus manifest revision for merged PR
    
    * Address PR comments
    
    * Fix maxI handling
    
    Setting maxI as &i incremented maxI even when breaking out of the loop.  Switched back to int, initialized to -1.
    
    * Use default checkpoint interval if not specified in config
    
    Co-authored-by: Adam Fraser <adam.fraser@couchbase.com>
    bbrks and adamcfraser committed Jun 12, 2020
    Configuration menu
    Copy the full SHA
    01e7a19 View commit details
    Browse the repository at this point in the history
  3. Integrate replicator package into db (#4614)

    Avoids cyclical dependencies between ActiveReplicator's use of a DB instance, and DB's collection of active replications.
    
    Straight move for most files, the only exception is that the contents of replicator/changes.go were appended to db/changes.go.
    adamcfraser committed Jun 12, 2020
    Configuration menu
    Copy the full SHA
    3daf1bd View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2020

  1. CBG-882 Align channels ORDER BY with index (#4615)

    * Update ORDER BY to align with index
    
    * Avoid extra whitespace when active only is not being used
    adamcfraser committed Jun 15, 2020
    Configuration menu
    Copy the full SHA
    7e74819 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2020

  1. CBG-838: Add sync_gateway user check (#4616)

    * CBG-838: Add sync_gateway user check
    
    * Add user definition too
    JRascagneres committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    1f2117f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fa645ed View commit details
    Browse the repository at this point in the history
  3. CBG-880: SGCollect Python3 compatibility (#4610)

    * CBG-880: SGCollect Python3 compatibility
    
    * Address PR comments
    
    * Upload fixes
    
    * Remove remaining double parentheses
    JRascagneres committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    7e08784 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2020

  1. CBG-864: Use addJSON errors and detection change (#4617)

    * CBG-864: Use addJSON errors and detection change
    
    * Add connection reset check
    
    * Switch error check back to strings
    JRascagneres committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    943118d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5ead5e0 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2020

  1. CBG-767-prereq Implement replication lifecycle features (#4620)

    * Refactor getOrAddDatabaseFromConfig for clarity
    
    Moved generation of databaseContextOptions into helper method to clarify the sequence of operations during database creation.
    
    * Connect replication API with active replicator
    
    Initialize config-based replications on startup, start replications on updated config.
    adamcfraser committed Jun 19, 2020
    Configuration menu
    Copy the full SHA
    c44d22c View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2020

  1. CBG-768 Report replicationStatus for active replications (#4621)

    * CBG-768 Report stats for active replications
    
    Implement _replicationStatus for local, active replications.  Non-active replication status is still stubbed out pending CBG-909.
    
    * Fix for replications assigned on startup
    
    Previously were not being added to activeReplications. Includes additional diagnostic logging.
    adamcfraser committed Jun 22, 2020
    Configuration menu
    Copy the full SHA
    6a159ff View commit details
    Browse the repository at this point in the history
  2. CBG-774 ConflictResolverFunc definition and API (#4622)

    * ConflictResolverFunc definition and API
    
    Adds ConflictResolverFunc API, implementations of default/localWins/RemoteWins, and constructor to return function based on config value.
    
    * Add test for default conflict resolver
    adamcfraser committed Jun 22, 2020
    Configuration menu
    Copy the full SHA
    c120544 View commit details
    Browse the repository at this point in the history
  3. CBG-914 - Implement basic push replication (#4623)

    * CBG-914 Implement basic push replication
    
    * Rip out unused checkpointer code
    
    * Restore accidental removal of constructor
    
    * TestActiveReplicatorBlipsync now opens 2 blipsync connections (PushAndPull)
    
    * Run sendChanges in the push replicator in a goroutine
    bbrks committed Jun 22, 2020
    Configuration menu
    Copy the full SHA
    9d91250 View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2020

  1. CBG-777 Javascript custom conflict resolver (#4626)

    * CBG-777 Javascript custom conflict resolver
    
    Javascript custom conflict resolver taking a conflict as input, and returning a document body.
    
    * Whitespace fix
    
    * Apply suggestions from code review
    
    Co-authored-by: Ben Brooks <ben.brooks@couchbase.com>
    adamcfraser and bbrks committed Jun 23, 2020
    Configuration menu
    Copy the full SHA
    e181625 View commit details
    Browse the repository at this point in the history
  2. CBG-915 - Refactor blip.sendChanges for generic options parameter (#4624

    )
    
    * Share connect funciton for active replicators
    
    * Refactor blip.sendChanges for generic options
    
    * remove blipSyncContext sendChanges variables
    
    * Remove old values from blipSyncContext struct
    
    * Identify SGR2 and CBL2 clients
    bbrks committed Jun 23, 2020
    Configuration menu
    Copy the full SHA
    73f2a8a View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2020

  1. CBG-778 Invocation of default policy from custom conflict resolver (#…

    …4627)
    
    * CBG-778 Invocation of default policy from custom conflict resolver
    
    Supports calling defaultPolicy(conflict) from a custom conflict resolver in order to perform default conflict resolution.
    
    * Whitespace cleanup
    
    * Update sg-bucket revision for merged PR
    
    Co-authored-by: Ben Brooks <ben.brooks@couchbase.com>
    adamcfraser and bbrks committed Jun 24, 2020
    Configuration menu
    Copy the full SHA
    a779ea4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    45a7bf6 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2020

  1. CBG-767 Adds adhoc flag to replicationConfig (#4631)

    * Adds adhoc flag to replicationConfig
    
    Currently just a flag, behaviour when replications are stopped is pending CBG-924.
    
    * Fix copy/paste error
    
    Co-authored-by: Ben Brooks <ben.brooks@couchbase.com>
    adamcfraser and bbrks committed Jun 25, 2020
    Configuration menu
    Copy the full SHA
    a280c48 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    21421c0 View commit details
    Browse the repository at this point in the history
  3. CBG-916 - SGR2 Push checkpointing (#4629)

    * Rename stats accessors for consistency
    
    * Initial implementation of push checkpointing
    
    * Share common checkpointer code
    
    * Some more tidy up (removed unused functions)
    
    * Remove interim changes
    
    * Rename callbacks and move pre-response callback to be after a successful send
    bbrks committed Jun 25, 2020
    Configuration menu
    Copy the full SHA
    197aa36 View commit details
    Browse the repository at this point in the history
  4. Add /_debug/fgprof endpoint (#4635)

    * Add fgprof debug endpoint
    
    * Use standard debug seconds query param
    
    * Add temporary felixge manifest remote for fgprof
    
    * Add google/pprof dependency
    
    * Switch to mirrored repos
    bbrks committed Jun 25, 2020
    Configuration menu
    Copy the full SHA
    4526e2f View commit details
    Browse the repository at this point in the history
  5. Add test to pull tombstone in SGR2 (#4636)

    * Add test to pull tombstone in SGR2
    
    * Wait for change on rt1
    bbrks committed Jun 25, 2020
    Configuration menu
    Copy the full SHA
    a42e2f6 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2020

  1. CBG-786 - Purge document on removal when PurgeOnRemoval flag is set (#…

    …4634)
    
    * Purge document on removal when PurgeOnRemoval flag is set
    
    * Set checkpoints for purged docs
    
    * Include stat for SGR2 docs_purged
    bbrks committed Jun 26, 2020
    Configuration menu
    Copy the full SHA
    bc3c0c3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7fece44 View commit details
    Browse the repository at this point in the history
  3. CBG-835 - ActiveReplicator heartbeat mechanism (via websocket ping fr…

    …ames) (#4633)
    
    * Wire up config options
    
    * Bump go-blip manifest
    
    * Bump go-blip manifest
    
    * Bump go-blip manifest
    
    * Bump go-blip manifest
    
    * Remove duplicate blip.NewContext/NewBlipSyncContext and tidy up Checkpointer context
    
    * WebsocketPingInterval config tidy from PR comments
    
    * Change websocket config name
    
    * Remove old/unused constant
    
    * Remove old field from ServerConfig
    
    * Update field name to _secs
    bbrks committed Jun 26, 2020
    Configuration menu
    Copy the full SHA
    12367f5 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2020

  1. Use replicator-specific logging context for active replications (#4641)

    Passive replication continues to use the database's context, active replication uses a replication-specific context for additional logging context.
    
    Also removes omitempty to always display continuous=true/false in _replication response.
    adamcfraser committed Jun 29, 2020
    Configuration menu
    Copy the full SHA
    e6f397c View commit details
    Browse the repository at this point in the history
  2. CBG-802: Being able to configure OpenID Connect Test Provider with HT…

    …TPS (#4628)
    
    * CBG-802: Being able to configure OpenID Connect Test Provider with HTTPS
    
    * CBG-802: Clone the default http.Transport and apply selective changes to the copy while setting insecureSkipVerify
    
    * CBG-805: Check whether the  transport.TLSClientConfig is nil, and update the existing if non-nil
    sarathkumarsivan committed Jun 29, 2020
    Configuration menu
    Copy the full SHA
    e97ab8b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6011418 View commit details
    Browse the repository at this point in the history
  4. CBG-785 SGR2 conflict resolution (#4640)

    * Invoke conflictResolver during PutExistingRev
    
    Modify PutExistingRev to support invocation of conflict resolver when provided.
    
    Adds wrapper for ConflictResolverFunc to identify whether result is local/remote/merge based on revID comparison.
    
    * Updating revision tree based on conflict resolution outcome
    
    * Fixes for pushAndPull with conflict resolution
    
    SGR2 push replications need to send revisions with the noconflicts property set to true in order to avoid causing branched revision trees on the remote when the remote Sync Gateway is running with allowConflicts=true.
    
    Adds unit test to validate pushAndPull results.
    
    * Error check fix
    
    * Updates based on PR feedback
    
    Removed unused code, reworked assignment of conflict resolver to replication to ensure it's only set for pull replications.
    adamcfraser committed Jun 29, 2020
    Configuration menu
    Copy the full SHA
    102947a View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2020

  1. Configuration menu
    Copy the full SHA
    09edec3 View commit details
    Browse the repository at this point in the history
  2. Batch size for sgr2 (#4643)

    Adds batch_size config parameter, passes through to activeReplicator.
    adamcfraser committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    54f7116 View commit details
    Browse the repository at this point in the history
  3. Specify docIDs in subChanges only when we have any to send (#4645)

    * Specify docIDs in subChanges only when we have any to send
    
    * Handle marshal error when sending subChanges
    bbrks committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    b5ed670 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2020

  1. CBG-930 Enable delta sync flag for sg-replicate2 (#4646)

    If delta sync is disabled for an sg-replicate replication, override the calculated sgCanUseDeltas value for the replication's blip sync context.
    
    Note that this implies that pull replications from a remote that supports delta sync will still not use deltas unless deltas are enabled on the local node.  This matches CBL behaviour today (we don't accept deltas from CBL if deltas aren't enabled for the SG database).
    adamcfraser committed Jul 1, 2020
    Configuration menu
    Copy the full SHA
    80c70c9 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2020

  1. Configuration menu
    Copy the full SHA
    db0f4a0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ac6ef4a View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2020

  1. Configuration menu
    Copy the full SHA
    cd739e2 View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2020

  1. CBG-937 - More accurately track last_seq stats, and move old stat to …

    …last_seq_checkpointed (#4652)
    bbrks committed Jul 6, 2020
    Configuration menu
    Copy the full SHA
    772cc23 View commit details
    Browse the repository at this point in the history
  2. CBG-923 - Add rev response callback (#4653)

    * Add rev response callback
    
    * Invoke callback for all response types
    
    * Address PR feedback
    
    * Tweak stat reporting
    
    * Add doc_write_conflict stat
    bbrks committed Jul 6, 2020
    Configuration menu
    Copy the full SHA
    76e121d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    99dfc0c View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2020

  1. Implement includeConfig on replicationStatus APIs (#4654)

    Includes config definition in GET replicationStatus response when includeConfig=true query parameter is set.
    adamcfraser committed Jul 7, 2020
    Configuration menu
    Copy the full SHA
    8ce9a0c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7f5a72d View commit details
    Browse the repository at this point in the history
  3. CBG-805: Update test OIDC provider to simulate real-world token (#4639)

    * CBG-805: Update test OIDC provider to simulate real-world token
    
    * CBG-805: Simulate tokens for Microsoft Identity Platform and Yahoo! token format
    sarathkumarsivan committed Jul 7, 2020
    Configuration menu
    Copy the full SHA
    d9aa6e5 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2020

  1. Configuration menu
    Copy the full SHA
    7249ed3 View commit details
    Browse the repository at this point in the history
  2. CBG-944 Update replication state on one-shot completion (#4658)

    * One-shot stopping for pull replication
    
    * One-shot stopping for push replication
    
    * Initialize active replicator state to stopped
    
    * Test fixes
    
    * Avoid race on concurrent Stop, Stop and Replace
    
    * Fix races in activeReplicator
    
    Switch to a single lock for the replicator, and use for access to any internal properties.
    adamcfraser committed Jul 8, 2020
    Configuration menu
    Copy the full SHA
    272b606 View commit details
    Browse the repository at this point in the history
  3. Fix deadlock on replication stop (#4660)

    Callback invocation on replication completion was attempting to re-acquire the activeReplicator lock.  Switched onComplete to be invoked after releasing the lock, and also refactored to avoid unnecessary status call on replication complete.
    adamcfraser committed Jul 8, 2020
    Configuration menu
    Copy the full SHA
    24cf5bb View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2020

  1. CBG-944 Remove adhoc replications when stopped (#4661)

    Remove adhoc replications that are stopped (either via _replicationStatus?action=stop,  or on completion of a one-shot replication).
    adamcfraser committed Jul 9, 2020
    Configuration menu
    Copy the full SHA
    3cae53b View commit details
    Browse the repository at this point in the history
  2. CBG-958 Delta sync config fix and stats (#4662)

    * Delta sync config fix and stats
    
    Fixes config validation that was forcing replications to run with delta sync disabled, and adds stats for deltas sent/received/requested.
    
    * Simplify DeltasEnabled assignment
    adamcfraser committed Jul 9, 2020
    Configuration menu
    Copy the full SHA
    6608896 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2020

  1. CBG-960 Delete local replication checkpoint on reset (#4663)

    Co-authored-by: Sarath Kumar Sivan <4345604+sarathkumarsivan@users.noreply.github.com>
    Co-authored-by: Ben Brooks <ben.brooks@couchbase.com>
    3 people committed Jul 10, 2020
    Configuration menu
    Copy the full SHA
    2b0baa3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    701c179 View commit details
    Browse the repository at this point in the history
  3. CBG-963 replicationStatus filtering options (#4666)

    Adds support for localOnly, activeOnly, includeError as replicationStatus API query parameters.
    adamcfraser committed Jul 10, 2020
    Configuration menu
    Copy the full SHA
    882befb View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2020

  1. Accept 0 as a valid Expires and return the discovery data as not cach… (

    #4657)
    
    * Accept 0 as a valid Expires and return the discovery data as not cacheable
    
    * Set ttl=MaxProviderConfigSyncInterval if cacheable() returns error, instead of failing to initialize the metadata
    
    * Change logging level to info instead of debug while reporting cachable error
    sarathkumarsivan committed Jul 11, 2020
    Configuration menu
    Copy the full SHA
    7457ec9 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2020

  1. Configuration menu
    Copy the full SHA
    f46ce1d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4e56825 View commit details
    Browse the repository at this point in the history
  3. CBG-905: Support using custom OIDC claim as Sync Gateway username (#4655

    )
    
    * CBG-905: Support using custom OIDC claim as Sync Gateway username
    
    * CBG-906: Handle non-string values as username claim in identity token
    
    * CBG-906: Refactor handling non-string values as username claim in identity token
    
    * Update auth/oidc.go
    
    Refactor comments against username_claim
    
    Co-authored-by: Adam Fraser <adam.fraser@couchbase.com>
    
    * CBG-906: Refactor handling non-string values as username claim in identity token
    
    Co-authored-by: Adam Fraser <adam.fraser@couchbase.com>
    sarathkumarsivan and adamcfraser committed Jul 13, 2020
    Configuration menu
    Copy the full SHA
    d968622 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2020

  1. Configuration menu
    Copy the full SHA
    64a08b8 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2020

  1. CBG-947 - Checkpoint revisions which are ignored by a peer (#4670)

    * Checkpoint when revisions are ignored by a peer.
    
    * Add missing 'Pull' prefix in stat constant
    
    * Add specific AddIgnoredSeq method to reduce lock/unlock churn
    
    * Address PR comments
    
    * Batch push expected/alreadyKnown seq tracking
    
    * Pluralise callback names that now do batching
    
    * Final ignoredSeqs -> alreadyKnownSeqs rename
    bbrks committed Jul 16, 2020
    Configuration menu
    Copy the full SHA
    6a9d087 View commit details
    Browse the repository at this point in the history
  2. CBG-948 - Update last known rev IDs when we encounter a conflict on c…

    …heckpoint write (#4671)
    
    * Update last known rev IDs when we encounter a conflict on write
    
    * Move local/remote setCheckpoint retry handling into shared function
    
    * Add get/setCheckpointFn parameter names
    bbrks committed Jul 16, 2020
    Configuration menu
    Copy the full SHA
    b02729e View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2020

  1. CBG-938 Use MaxDoubling retry for Touch, GetAndTouch (#4673)

    MaxNumRetries isn't changed, so overall retry time is shorter for default spec values of MaxNumRetries and InitialRetrySleepTimeMS (by about 2s).
    adamcfraser committed Jul 17, 2020
    Configuration menu
    Copy the full SHA
    5d33e39 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2020

  1. Configuration menu
    Copy the full SHA
    99bdb18 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2020

  1. Configuration menu
    Copy the full SHA
    e965f00 View commit details
    Browse the repository at this point in the history
  2. CBG-980 Use context cfgSG to fire change events instead of routing th…

    …rough import listener (#4675)
    
    Removed obsolete importListener.NotifyCfg, moved prefix removal into FireEvent.
    adamcfraser committed Jul 21, 2020
    Configuration menu
    Copy the full SHA
    97dc83d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    22adcc2 View commit details
    Browse the repository at this point in the history
  4. CBG-983 RevID fix for Get1xRevAndChannels (#4677)

    Get1xRevAndChannels was attempting to return the transport-only revID property, which isn't set in this usage.
    adamcfraser committed Jul 21, 2020
    Configuration menu
    Copy the full SHA
    a5b2661 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2020

  1. Configuration menu
    Copy the full SHA
    13dbb8b View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2020

  1. CBG-921 Skip _txn: prefixed documents during DCP processing (#4683)

    Avoids SG interaction with transaction metadata documents.
    
    No additional handling is needed for on-demand import scenarios, as the underscore-prefixed metadata documents are not have valid SG docIDs and already can't be accessed through SG's REST API.
    adamcfraser committed Jul 23, 2020
    Configuration menu
    Copy the full SHA
    76c898d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    abda4aa View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4f4ba12 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2020

  1. Configuration menu
    Copy the full SHA
    50996e3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3f3b9a6 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2020

  1. CBG-931 Perform all config validation at creation time (#4687)

    Added missing Direction validation to ValidateReplication, reused ValidateReplication on replication start.
    adamcfraser committed Jul 27, 2020
    Configuration menu
    Copy the full SHA
    9439da5 View commit details
    Browse the repository at this point in the history
  2. CBG-920: SGR2 track pulled norev sequences for checkpointing (#4686)

    * Track sequences for pulled norevs for checkpointing purposes
    
    * Move IDAndRev handling for pull replications/norev seq lookups down into checkpointer
    
    * Minor tweak for readability
    bbrks committed Jul 27, 2020
    Configuration menu
    Copy the full SHA
    7fa5e2e View commit details
    Browse the repository at this point in the history
  3. CBG-951: Deleted documents should set _deleted:true for import filter…

    … function (#4678)
    
    * CBG-951: Deleted documents should set _deleted:true for import filter function
    
    * CBG-926: Set delete property when body is both empty and non-empty and refactor unit test
    
    * CBG-926: Take a shallow copy of the body and set _deleted property the import is for delete and the body is not empty
    sarathkumarsivan committed Jul 27, 2020
    Configuration menu
    Copy the full SHA
    5fa3709 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2020

  1. Configuration menu
    Copy the full SHA
    2f0d104 View commit details
    Browse the repository at this point in the history
  2. CBG-949: Improve error when non-upgradable HTTP request is sent to _b… (

    #4690)
    
    * CBG-949: Improve error when non-upgradable HTTP request is sent to _blipsync endpoint
    
    * CBG-949: Exit early when the connection can't be switched to websocket protocol without incrementing the status
    
    * CBG-949: Fix Jenkins CI build failure due to wrong status code assertion in TestBlipSyncNonUpgradableConnection
    sarathkumarsivan committed Jul 29, 2020
    Configuration menu
    Copy the full SHA
    6132c1e View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2020

  1. Do not include pointer addresses when logging heartbeat node set (#4693)

    The nodeListenerMap is useful when triaging node assignment issues, but inclusion of listener pointer addresses made it less readable.
    adamcfraser committed Jul 30, 2020
    Configuration menu
    Copy the full SHA
    8d430f0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9f86bf8 View commit details
    Browse the repository at this point in the history
  3. CBG-909 Persist replication status for non-local access (#4689)

    Co-authored-by: Ben Brooks <ben.brooks@couchbase.com>
    adamcfraser and bbrks committed Jul 30, 2020
    Configuration menu
    Copy the full SHA
    08a1096 View commit details
    Browse the repository at this point in the history
  4. Send 'ignoreNoConflicts' flag for SGR2 push replications (#4695)

    Allows for Hydrogen to Hydrogen push replication to a peer running in no
    conflicts mode.
    bbrks committed Jul 30, 2020
    Configuration menu
    Copy the full SHA
    ce01841 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2020

  1. Configuration menu
    Copy the full SHA
    56eebf0 View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2020

  1. Configuration menu
    Copy the full SHA
    930156f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c0bd757 View commit details
    Browse the repository at this point in the history
  3. CBG-975: SG-Replicate 2: Support basic auth credentials (username/pas…

    …sword) as separate config options (#4697)
    sarathkumarsivan committed Aug 5, 2020
    Configuration menu
    Copy the full SHA
    1781a86 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2020

  1. Configuration menu
    Copy the full SHA
    4c6979e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3c81daa View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2020

  1. Configuration menu
    Copy the full SHA
    61d731e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    968dfdd View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2020

  1. Rely on dbContext/serverContext close to call bucket teardown (#4710)

    * Rely on dbContext/serverContext close to call bucket teardown, avoids incorrect ordering of closing a bucket before dbContext
    
    * Avoid testBucket.Bucket pattern in Authenticator/DatabaseContext
    
    * Handle getting underlying GoCB Bucket in CouchbaseURIToHttpURL
    bbrks committed Aug 14, 2020
    Configuration menu
    Copy the full SHA
    67a8599 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b97f2b8 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2020

  1. Configuration menu
    Copy the full SHA
    0a2e63e View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2020

  1. Configuration menu
    Copy the full SHA
    e87e95d View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2020

  1. Configuration menu
    Copy the full SHA
    2f89c21 View commit details
    Browse the repository at this point in the history
  2. Rename TestRemoveObsoleteIndexOnFail test to TestRemoveObsoleteIndexO…

    …nError to prevent appearing in searches for 'FAIL:' (#4713)
    bbrks committed Aug 19, 2020
    Configuration menu
    Copy the full SHA
    d0d138c View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2020

  1. Configuration menu
    Copy the full SHA
    0188f3e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    229709d View commit details
    Browse the repository at this point in the history
  3. CBG-973: Avoid collecting sensitive data during sgcollect (#4704)

    Co-authored-by: Adam Fraser <adam.fraser@couchbase.com>
    sarathkumarsivan and adamcfraser committed Aug 21, 2020
    Configuration menu
    Copy the full SHA
    d5a4b10 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7ce0427 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bb10e46 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7d4eda5 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2020

  1. CBG-1000 Wait for remote sequence allocation on cache start (#4720)

    Ensure allocated sequences are used or released prior to cache start
    adamcfraser committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    d1b7cf9 View commit details
    Browse the repository at this point in the history
  2. CBG-946: Repeated change entries on access grant to doc's previous ch…

    …annel (#4714)
    
    * Working session for CBG-946
    
    * CBG-946: Repeated change entries on access grant to doc's previous channel
    
    * CBG-946: Refactor TestPostChangesAdminChannelGrantRemoval
    
    * CBG-946: Format package imports
    
    * CBG-946: Additional coverage in TestPostChangesAdminChannelGrantRemoval
    
    * CBG-946: Fix build failures in TestGetRemovedDoc and TestPostChangesAdminChannelGrantRemoval
    
    * CBG-946: Refactor TestPostChangesAdminChannelGrantRemoval include WaitForChanges enough to avoid this fixed sleep
    
    * CBG-946: Disable sequence batching for multi-RT tests
    
    * Update rest/replication_api_test.go
    
    Co-authored-by: Ben Brooks <ben.brooks@couchbase.com>
    
    * Update rest/replication_api_test.go
    
    Co-authored-by: Ben Brooks <ben.brooks@couchbase.com>
    
    * CBG-946: Keep the deleteDoc function limited to just validating the delete via the response
    
    * CBG-946: Fix build errors
    
    Co-authored-by: Adam Fraser <adam.fraser@couchbase.com>
    Co-authored-by: Ben Brooks <ben.brooks@couchbase.com>
    3 people committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    d33348f View commit details
    Browse the repository at this point in the history
  3. CBG-1012 Persist replication status with checkpoints (#4719)

    * CBG-1012 Persist replication status with checkpoints
    
    Store replication status with checkpoints instead of as separate status.  Supports status retrieval between nodes within a cluster, and status consistency across replication stop/start/rebalance.
    
    * Fix for test races
    
    Switch to state/error lock in a few places, add support for checkpointer to persist status and update lastLocal safely.
    
    * Error handling fix
    adamcfraser committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    7f4ea95 View commit details
    Browse the repository at this point in the history
  4. CBG-919: Integrated Prometheus Exporter (#4681)

    * CBG-919: Integrated Prometheus Exporter
    
    * GSI and SharedBucket
    
    * Add float and delta stats
    
    * Replication stats and sync.Once
    
    * Added Value() in prep for atomic
    
    * Mutexes
    
    * Most database stats
    
    * Cache stats
    
    * Handle external expvars
    
    * Mutex GSI fix
    
    * Ensure all the names are inline with existing
    
    * Clean up
    
    * Modify when stats initialize
    
    * BLIP test tweaks
    
    * Rebase Blip Replicator Stats
    
    * Addressed some PR comments
    
    * address more
    
    * Const format for query view stat
    
    * Remove old dbStats
    
    * More addressing PR comments
    
    * Test fix
    
    * Last cleanup
    
    * Fix dbStats map data race
    
    * Rename initQueryStat
    
    * Added benchmark
    
    * Fix new tests
    
    * Added more benchmarks and switched to atomic
    
    * Replace sprintf with format
    
    * Add sgw_up for compat
    
    * Rename metrics config to be inline with others
    
    * Test fixes
    
    * Test fixes
    JRascagneres committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    13bd94e View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2020

  1. Configuration menu
    Copy the full SHA
    2f225ec View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a056db8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d259ace View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    77baeaf View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ba9ebb1 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2020

  1. CBG-1022: Require replication to be stopped prior to upsert (#4729)

    * CBG-1022: Require replication to be stopped prior to upsert
    
    * Address PR comment
    JRascagneres committed Aug 26, 2020
    Configuration menu
    Copy the full SHA
    572b2d0 View commit details
    Browse the repository at this point in the history
  2. Blip response type race fix: Read full response body first (#4733)

    * Read full response body before checking response type
    
    * Log for error, and apply same handling in SGR2 checkpoint response code
    
    * Apply same handling in rev response
    bbrks committed Aug 26, 2020
    Configuration menu
    Copy the full SHA
    1f5e842 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2020

  1. Configuration menu
    Copy the full SHA
    bb31723 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    17a80c4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    470645a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c7c2ed9 View commit details
    Browse the repository at this point in the history
  5. Fix TestTombstoneCompaction assertion of mixed int/int64 types (#4737)

    * Fix assertion of mixed int/int64 types
    
    * Fix import stats init
    
    Co-authored-by: JRasagneres <jacquesrascagneres@gmail.com>
    bbrks and JRascagneres committed Aug 27, 2020
    Configuration menu
    Copy the full SHA
    07a4078 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7a7f64a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0e4228f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    73be6dc View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2020

  1. Configuration menu
    Copy the full SHA
    d6d1663 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2020

  1. Configuration menu
    Copy the full SHA
    4ba8e7b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    17c0c26 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    82489d9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    458b3d6 View commit details
    Browse the repository at this point in the history
  5. Fix reconnect ctx race (#4745)

    * Fix reconnect ctx race
    
    * Return context error value from reconnect worker for correct ConnectsAborted stats
    
    * Last reference to a.ctx in reconnect fn
    
    * Revert accidental assert -> require change
    bbrks committed Sep 2, 2020
    Configuration menu
    Copy the full SHA
    f5dd71a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6b35b7a View commit details
    Browse the repository at this point in the history
  7. CBG-945 Clear status on replication reset (#4746)

    * New test for replication status actions
    
    * Fix reset handling
    
    Reset replication stats and checkpointer when reset is invoked.
    
    * Avoid sleep in test
    adamcfraser committed Sep 2, 2020
    Configuration menu
    Copy the full SHA
    f988a76 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2020

  1. Configuration menu
    Copy the full SHA
    d3b3229 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    159b953 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    97359f1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8533ce9 View commit details
    Browse the repository at this point in the history
  5. CBG-1057: Deterministic prometheus stat label ordering (#4751)

    * CBG-1057: Deterministic prometheus stat label ordering
    
    * Change to two slices
    JRascagneres committed Sep 3, 2020
    Configuration menu
    Copy the full SHA
    f093441 View commit details
    Browse the repository at this point in the history
  6. CBG-954 - Invoke reconnect loop when BLIP/Websocket connection closes (

    …#4728)
    
    * Invoke reconnect loop when BLIP OnExitCallback is fired.
    
    * Bump go-blip manifest for branch
    
    * bump go-blip manifest
    
    * Prevent reconnect loop firing on intentional replicator stop
    
    * bump go-blip manifest for merged PR
    
    * Reverse context error check for reconnect
    
    * Fix replication rebalance races on RestTester teardown
    
    * On ActiveReplicator Stop, cancel the replicator's reconnect handling before disconnecting
    
    * Stop ActiveReplicator's reconnect handling on Complete callback
    
    * Treat empty body the way io.EOF used to be treated for BLIP changes responses
    
    * Compare stats vs. start of test instead of from zero
    bbrks committed Sep 3, 2020
    Configuration menu
    Copy the full SHA
    7183d80 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2020

  1. Configuration menu
    Copy the full SHA
    3d0c8ab View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a237d08 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2020

  1. CBG-998 Retry on ErrNotStored for xattr updates (#4760)

    An insert race can return ErrNotStored (instead of ErrKeyExists) for xattr subdoc inserts.  This should be routed through the standard CAS failure handling, instead of reporting an error.
    adamcfraser committed Sep 8, 2020
    Configuration menu
    Copy the full SHA
    9d0750e View commit details
    Browse the repository at this point in the history
  2. CBG-929 - Process attachments from a merge via the sg-replicate custo…

    …m conflict resolver (#4758)
    
    * Process attachments from a merge via the sg-replicate custom conflict resolver.
    
    * Wait for merged change in test
    
    * Use table driven tests for various combinations of attachment merges
    bbrks committed Sep 8, 2020
    Configuration menu
    Copy the full SHA
    49ba6b9 View commit details
    Browse the repository at this point in the history
  3. CBG-1053: Adhoc replicationStatus panic fix (#4757)

    * CBG-1053: Adhoc replicationStatus panic fix
    
    * Change check condition to wait
    
    * Race fix
    
    * Address PR comment
    JRascagneres committed Sep 8, 2020
    Configuration menu
    Copy the full SHA
    b26a3db View commit details
    Browse the repository at this point in the history
  4. CBG-1035: Add Grafana and update for Hydrogen (#4755)

    * CBG-1035: Add Grafana and update for Hydrogen
    
    * Additions
    JRascagneres committed Sep 8, 2020
    Configuration menu
    Copy the full SHA
    388a335 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2020

  1. Prevent falling back to the SGR1 checkpoint for a second time (#4761)

    * Prevent falling back to the SGR1 checkpoint for a second time
    
    Avoids the case where some documents may not be replicated because
    of SGR1 checkpoint reuse when both local and remote SGR2 checkpoints
    have been removed through expiry, replicator reset, bucket flush, rollback, etc.
    
    * Write SGR2 checkpoint when performing SGR1 checkpoint upgrade
    
    * Improve logging around checkpoint seq retrieval
    
    * Switch test to reset replicator instead of deleting checkpoint
    
    * Simplify common assertions
    bbrks committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    30493cc View commit details
    Browse the repository at this point in the history
  2. CBG-1028: Fix inconsistencies in default conflict resolver by local t…

    …ombstone handling (#4756)
    
    * CBG-1028: Customer feedback:Default conflict resolver not behaving consistently
    
    * CBG-1028: Remove the methods which became obsolete after introducing table driven tests.
    
    * CBG-1028: Assert body value in requireBodyNotEmpty
    
    * CBG-1028: Adjust the requiredAdditionalRevs buffer value and incorporate the feedback on unit tests.
    
    * CBG-1028: Update the document on rt2 with the specified body values.
    
    * CBG-1028: Check for revID instead of docID in TestDefaultConflictResolverWithTombstone
    sarathkumarsivan committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    f51d7b8 View commit details
    Browse the repository at this point in the history
  3. Fix race for allowed attachment processing (#4762)

    * Fix race for allowed attachment processing
    
    Not seen this manifest in the real world, but there's a gap between
    sending the rev message, and adding the allowed attachments that the
    client will ask for. If the response gets back to us quick enough, the
    attachments won't be marked as allowed.
    
    * Remove allowed attachments in send error case
    bbrks committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    669dfce View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2020

  1. Throttle concurrent in-flight changes requests per connection to 2 (#…

    …4767)
    
    Couchbase Lite already limits the number of in-flight changes batches
    to prevent Sync Gateway from preparing the revs for batches too far ahead of
    time and having to keep them in memory before we're able to send them.
    
    This commit enforces that limit on the server side for each client, to
    prevent non-CBL clients from issuing too many changes requests before
    the revs for those batches have had chance to be sent.
    
    We keep this number >1 in order to keep the list of revs supplied for
    clients to allow for a continous stream of revisions to be available and
    prevent "batchiness" in the sync.
    bbrks committed Sep 10, 2020
    Configuration menu
    Copy the full SHA
    614a081 View commit details
    Browse the repository at this point in the history
  2. Prevent activeSubChanges flag race when client is rapidly issuing req…

    …uests (#4766)
    
    * Perform a retry loop on the active subChanges CAS operation to prevent races when a client is rapidly requesting sequential subChanges requests
    
    * Tweak CASRetry timing
    bbrks committed Sep 10, 2020
    Configuration menu
    Copy the full SHA
    a318a5b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b571358 View commit details
    Browse the repository at this point in the history
  4. CBG-1047 Re-initialize replication when config is upserted (#4764)

    Co-authored-by: JRasagneres <jacquesrascagneres@gmail.com>
    adamcfraser and JRascagneres committed Sep 10, 2020
    Configuration menu
    Copy the full SHA
    deea3b1 View commit details
    Browse the repository at this point in the history
  5. CBG-1044: Don't trigger conflict resolution for two tombstones (#4759)

    * CBG-1044: Don't trigger conflict resolution for two tombstones
    
    * Add extra test to ensure revID
    
    * Change handling and add tests
    
    * Remove sleeps
    
    * Reworked and added passive SGR2 support
    
    * Change clientType type
    
    * Address PR comments
    JRascagneres committed Sep 10, 2020
    Configuration menu
    Copy the full SHA
    1d447a5 View commit details
    Browse the repository at this point in the history
  6. CBG-1071 Restore CBL pull attachment count/attachment bytes (#4768)

    These were incorrectly swapped to the push stats as part of the stat format update.
    adamcfraser committed Sep 10, 2020
    Configuration menu
    Copy the full SHA
    e40b68f View commit details
    Browse the repository at this point in the history
  7. CBG-1049: Don't tombstone an already deleted revision whilst applying…

    … conflict resolution (#4763)
    
    * CBG-1049: Don't tombstone an already deleted revision whilst applying conflict resolution
    
    * CBG-1049: Assert expected tombstone revID in waitForTombstone
    
    * CBG-1049: Add additional coverage for tombstone handling when remote revision is tombstoned
    
    * CBG-1049: Format logging message
    
    * Only bypass conflict resolution for incoming tombstones when local is also a tombstone
    
    Co-authored-by: Adam Fraser <adam.fraser@couchbase.com>
    sarathkumarsivan and adamcfraser committed Sep 10, 2020
    Configuration menu
    Copy the full SHA
    ea82bd0 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2020

  1. CBG-1060 Add close waitgroup for sgReplicateManager (#4769)

    sgReplicateManager.Stop() now blocks until clusterSubscribe and clusterUpdate goroutines have exited, avoiding potential races during test bucket teardown.
    adamcfraser committed Sep 11, 2020
    Configuration menu
    Copy the full SHA
    dee45fb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1ed0c13 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2020

  1. CBG-1074: Grafana README updates (#4773)

    * CBG-1074: Grafana README updates
    
    * Address PR comment
    JRascagneres committed Sep 15, 2020
    Configuration menu
    Copy the full SHA
    10132c1 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2020

  1. Configuration menu
    Copy the full SHA
    c79acc8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e9f12b8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a29db07 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2020

  1. Avoid race in TestSGR2TombstoneConflictHandling (#4785)

    * Work on TestSGR2TombstoneConflictHandling
    
    * Require no error and nil check
    
    * Remove error assert
    JRascagneres committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    557ec48 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4a70901 View commit details
    Browse the repository at this point in the history
  3. CBG-1077 Avoid state reset on restarted node (#4787)

    The value used to specify that a replication should start in stopped state is switched to initial_state.
    
    TargetState continues to be used internally for state transitions.  Target state is set to initial state the first time a replication is added to the cfg.
    adamcfraser committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    7b94850 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    23ec88b View commit details
    Browse the repository at this point in the history
  5. PrometheusRules: Added Prometheus directory (#4789)

    * PrometheusRules: Added Prometheus directory
    
    * Address PR comments
    
    * Comment out SGR1 row
    
    * Remove extra space
    JRascagneres committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    9ae0aff View commit details
    Browse the repository at this point in the history
  6. CBG-1005: Update examples & README (#4775)

    * CBG-1005: Update examples & README
    
    * Fix config
    
    * Remove old replication example
    
    * Remove file
    
    * Add a couple extra examples
    JRascagneres committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    9b7da41 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2020

  1. CBG-1072 Ensure ordering of recent sequences (#4792)

    Sort recent sequences prior to updating syncData.
    adamcfraser committed Sep 18, 2020
    Configuration menu
    Copy the full SHA
    eb5696d View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2020

  1. CBG-1085 Re-register node when not present on cluster update (#4797)

    * CBG-1085 Re-register node when not present on cluster update
    
    When a SG node receives a cluster cfg update that doesn't it's own node UUID (e.g. it's been removed by another node due to heartbeat expiry), it should re-register itself to the node set.
    
    * Simplify localNodePresent calculation
    adamcfraser committed Sep 22, 2020
    Configuration menu
    Copy the full SHA
    5aa1237 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2020

  1. CBG-1087 Preserve document metadata under localWins conflict resoluti…

    …on (#4801)
    
    * CBG-1087 Preserve document metadata under localWins conflict resolution
    
    Fixes issue where document metadata (deleted, attachments) weren't being preserved under localWins conflict resolution.
    
    * Comment touch-up
    adamcfraser committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    1dda0cb View commit details
    Browse the repository at this point in the history
  2. CBG-1095 Re-register import node after transient removal (2.8.0) (#4804)

    If an import node is temporarily removed from the set of cbgt node definitions (e.g. due to temporary dropped heartbeats), have nodes re-register themselves.
    adamcfraser committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    e2e7d42 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2020

  1. CBG-1127 Don't treat imported SDK resurrections as conflicts (#4823)

    * CBG-1127 Don't treat imported SDK resurrections as conflicts
    
    When a tombstoned document is resurrected via the SDK, the metadata history is lost and the document is resurrected as a new revision on a disconnected branch.  When replicated via sg-replicate, this revision shouldn't be treated as being in conflict with a tombstoned document (no active leaves).
    
    Concurrent updates and deletes to the same revision continue to be treated as conflicts, as this doesn't meet the 'disconnected branch' criteria.
    
    * Port test fixes from master
    
    * Avoid timing issues for TestActiveReplicatorPushAndPullConflict
    adamcfraser committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    2ecbc77 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2020

  1. Configuration menu
    Copy the full SHA
    c2431b2 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2020

  1. [2.8.0.1 Backport] - CBG-1179 - Strip basic auth component before sen…

    …ding blipsync websocket request (#4841)
    bbrks committed Nov 5, 2020
    Configuration menu
    Copy the full SHA
    8a982d1 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2021

  1. Configuration menu
    Copy the full SHA
    786d680 View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2021

  1. Configuration menu
    Copy the full SHA
    c9f8f80 View commit details
    Browse the repository at this point in the history
  2. [2.8.1 Backport] - CBG-1265 - Ensure partial backfills contain the tr…

    …iggered by change for existing channels (#4910)
    bbrks committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    f1be615 View commit details
    Browse the repository at this point in the history
  3. [2.8.1 Backport] - CBG-1244 - DocumentChange event winning_rev_only o…

    …ption (#4909)
    
    * [2.8.1 Backport] Fix empty webhook payload logging due to buffer-reuse (#4891)
    
    * [2.8.1 Backport] Use standard config schema validation for event handler config validation (#4898)
    
    * [2.8.1 Backport] Add winning_rev_only option to DocumentChanged event handler config (#4901)
    
    * Add String method to EventType for better logging
    
    * Add winning_rev_changed event handler
    
    * Rework winning rev only option for DocumentChanged event to use generic options supplied to all event handlers/webhooks.
    
    * Add missing params in event/webhook functions
    
    * Remove old event type
    
    * Address PR comments
    bbrks committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    2edc9a0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    586fb79 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2021

  1. Configuration menu
    Copy the full SHA
    f96cf54 View commit details
    Browse the repository at this point in the history
  2. [2.8.1 Backport] - CBG-1267 Exit cache processing for _sync:cfg docs …

    …after cfgEventCallback (#4922)
    adamcfraser committed Jan 14, 2021
    Configuration menu
    Copy the full SHA
    c6c8472 View commit details
    Browse the repository at this point in the history
  3. [2.8.1 Backport] - CBG-1221 Include NODE_DEFS_WANTED in heartbeat nod…

    …e set (#4923)
    
    Backports CBG-1219 to 2.8.1.
    adamcfraser committed Jan 14, 2021
    Configuration menu
    Copy the full SHA
    a5fea2d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b1de96a View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2021

  1. Configuration menu
    Copy the full SHA
    4937c0c View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2021

  1. CBG-1263 Remove legacy cbgt index definition (#4933)

    Backports CBG-1222 to 2.8.1
    adamcfraser committed Jan 18, 2021
    Configuration menu
    Copy the full SHA
    69e08de View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2021

  1. Configuration menu
    Copy the full SHA
    55492a8 View commit details
    Browse the repository at this point in the history
  2. [2.8.1 Backport] CBG-1235 - Add option to hide product version info f…

    …rom non-admin requests (#4935)
    
    * [2.8.1 Backport] CBG-759 - Add option to hide product version info from non-admin requests (#4928)
    
    * CBG-759 - Add option to hide product info from non-admin requests
    
    * Scope placeholders in version.go to prevent accidental usage
    
    * Have default ProductName const (for use in testing)
    
    * Omit product name from Basic auth realm when hide_product_info=true
    
    * Hide product version only
    
    * Fix test assertions for last change
    
    * Address PR comments (add rootResponse struct and build wwwAuthenticateHeader ahead of time)
    
    * Fix unused import from cherry-pick
    bbrks committed Jan 19, 2021
    Configuration menu
    Copy the full SHA
    7d7110b View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2021

  1. CBG-1200: Improve handling for newly created tombstones to prevent em…

    …pty documents (#4884) (#4937)
    
    * CBG-1200: Tombstones v2
    
    * Possibly handle pre-6.6
    
    * Alter returned cas values
    
    * Additional Test
    
    * Added manual test
    
    * Remove debug
    
    * Test fix
    
    * Missed skip on manual test
    
    * Address PR comments and import handling
    
    * Remove commented out block
    
    * Additional cleanup
    
    * Change if requirements
    
    * Bump manifest
    
    * Assert specific error in tests
    JRascagneres committed Jan 20, 2021
    Configuration menu
    Copy the full SHA
    41682bd View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2021

  1. Configuration menu
    Copy the full SHA
    a89e637 View commit details
    Browse the repository at this point in the history
  2. CBG-1273: Add more prometheus alert examples (#4936) (#4944)

    * CBG-1273: Add more prometheus alert examples
    
    * address PR comments
    JRascagneres committed Jan 22, 2021
    Configuration menu
    Copy the full SHA
    6ecacdc View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2021

  1. Configuration menu
    Copy the full SHA
    c508f8b View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2021

  1. CBG-1311 Backport CBG-1304 to 2.8.1 (#4958)

    Fixes ISGR: Pull replications incompatible with active-side allow_conflicts=false
    adamcfraser committed Feb 8, 2021
    Configuration menu
    Copy the full SHA
    1ac44d3 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2021

  1. Configuration menu
    Copy the full SHA
    0be9ae8 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2021

  1. CBG-1341 Backport CBG-1339 to 2.8.2 (#4970)

    Fix for infinite loop when tombstoning a server tombstone.
    adamcfraser committed Feb 26, 2021
    Configuration menu
    Copy the full SHA
    4df7a2d View commit details
    Browse the repository at this point in the history