CouchDB
  1. CouchDB
  2. COUCHDB-1363

callback invocation for docs added during couch_changes startup can be delayed by race condition

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.3, 1.1.1
    • Fix Version/s: 1.2, 1.2.1, 1.3
    • Component/s: Database Core
    • Labels:
      None

      Description

      After subscribing to notifications it's necessary to re-open the #db a so that the header points at all updates for which the updater notifier has already fired events. In practice, this is rarely problematic because the next change will cause everything to catch up, but if a quick burst of changes happens while, e.g., replication is starting the replication can go stale. Detected by intermittent replicator_db js test failures.

        Activity

        Randall Leeds created issue -
        Randall Leeds made changes -
        Field Original Value New Value
        Attachment 0001-Fix-a-race-condition-starting-replications.patch [ 12507479 ]
        Randall Leeds made changes -
        Assignee Filipe Manana [ fdmanana ]
        Randall Leeds made changes -
        Summary Race condition edge case when pulling local changes callback invocation for docs added during couch_changes startup can be delayed by race condition
        Description It's necessary to re-open the #db after subscribing to notifications so that updates are not lost. In practice, this is rarely problematic because the next change will cause everything to catch up, but if a quick burst of changes happens while replication is starting the replication can go stale. Detected by intermittent replicator_db js test failures. After subscribing to notifications it's necessary to re-open the #db a so that the header points at all updates for which the updater notifier has already fired events. In practice, this is rarely problematic because the next change will cause everything to catch up, but if a quick burst of changes happens while, e.g., replication is starting the replication can go stale. Detected by intermittent replicator_db js test failures.
        Randall Leeds made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Filipe Manana [ fdmanana ]
        Fix Version/s 1.0.4 [ 12317603 ]
        Fix Version/s 1.1.2 [ 12318873 ]
        Resolution Fixed [ 1 ]
        Robert Newson made changes -
        Fix Version/s 1.2.1 [ 12319457 ]
        Fix Version/s 1.1.2 [ 12318873 ]
        Robert Newson made changes -
        Fix Version/s 1.0.4 [ 12317603 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Randall Leeds
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development