CBL-7099: Passive Replicator in Multipeer Replication stayed in BUSY …#2300
Merged
Conversation
…state The root cause is the following. Replicator keeps the status of the pushers and pullers. They are initialized at Busy. Workers in general initializes the status either Idle or Connecting. When initialized to Idle, it may stay in Idle and since there is no change in the status, it won't have chance to update the paret Replicator. I changed the Worker to initialize the status to Busy or Connecting. Workers cannot stay in Busy if there is no real activity.
|
Code Coverage Results:
|
pasin
approved these changes
Jul 2, 2025
jianminzhao
added a commit
that referenced
this pull request
Jul 2, 2025
CBL-7099: Passive Replicator in Multipeer Replication stayed in BUSY state (#2300) CBL-7013: Native crash when using LiteCore 3.3.0-80 (#2299) CBL-7134: Added Observer::removeFromObserverList() CBL-7100: Stop Multipeer Replicator causes the user's database to be closed (#2293) CBL-7026: Limit character set allowed in the database name (#2292) Inlcuded in EE: CBL-7140: Ensure C4PeerSync::stop always notifies (#60) 7319f7f C4PeerSync::onlinePeers should not return offline peers, duh (#59) 214063c Added calls to Observer::removeFromObserverList CBL-7101: Ensure proper shutdown of C4PeerSync / MeshManager CBL-7100: Stop Multipeer Replicator causes the user's database to be closed. (#57)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…state
The root cause is the following. Replicator keeps the status of the pushers and pullers. They are initialized at Busy. Workers in general initializes the status either Idle or Connecting. When initialized to Idle, it may stay in Idle and since there is no change in the status, it won't have chance to update the parent Replicator.
I changed the Worker to initialize the status to Busy or Connecting. Workers cannot stay in Busy if there is no real activity.