[ZEO4] server: Always iterate over snapshot of .connections[storage_id]
Or else such iteration can race with deletion of elements in that list on client disconnection. StorageServer.close was already iteration over snapshot, but StorageServer.invalidate was not. As the result sending out invalidations were subject to race wrt client disconnections, and some invalidations could be skipped to be delivered causing further data corruption. Fixes Bug2 from https://github.com/zopefoundation/ZEO/issues/209 Tests for this fix were developed as part of ZODB5: https://github.com/zopefoundation/ZODB/pull/368 https://github.com/zopefoundation/ZODB/commit/942099c6c430 https://github.com/zopefoundation/ZODB/commit/a03c47787698 https://github.com/zopefoundation/ZODB/commit/c593c7d5baf1 https://github.com/zopefoundation/ZODB/commit/fa8441591074 https://github.com/zopefoundation/ZODB/commit/fc20f3aaddda https://github.com/zopefoundation/ZODB/commit/a94d63c552d6 and are too big and probably not worth it to backport.
Showing
Please register or sign in to comment