Prevent replicator manager change feeds from getting stuck Switch them them from longpoll to normal This would prevent them being stuck. That could happen if more than one resume_scan message arrives for the same shard. The first time a longpoll changef feed would finish and end sequence is checkpointed. But if another resume_scan arrives and database hasn’t changed then the longpoll change feed would hang until db is updated. The reason there would be multiple resume_scan messages is because there is a race condition between db update handler and scanner component. They are both started asynchronously roughly at the same. Scanner finds new shard while db handler notices changes for those shards. If shards are modified quickly after they are discovered by the scanner both of those components would issue a resume_scan. The effect of this would be more pronounced if there are a large number of _replicator shards and constant db creation/deletion/updates. COUCHDB-2964
Prevent replicator manager change feeds from getting stuck
Switch them them from longpoll to normal
longpoll
normal
This would prevent them being stuck. That could happen if more than one resume_scan message arrives for the same shard. The first time a longpoll changef feed would finish and end sequence is checkpointed. But if another resume_scan arrives and database hasn’t changed then the longpoll change feed would hang until db is updated.
resume_scan
The reason there would be multiple resume_scan messages is because there is a race condition between db update handler and scanner component. They are both started asynchronously roughly at the same. Scanner finds new shard while db handler notices changes for those shards. If shards are modified quickly after they are discovered by the scanner both of those components would issue a resume_scan.
The effect of this would be more pronounced if there are a large number of _replicator shards and constant db creation/deletion/updates.
COUCHDB-2964
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号