akka-persistence-mongo icon indicating copy to clipboard operation
akka-persistence-mongo copied to clipboard

Risk of race condition when deleting journal collection ?

Open gbrd opened this issue 6 years ago • 3 comments

When we do (in CasbahPersistenceJournaller.deleteFrom() for example) :

    if (driver.useSuffixedCollectionNames && driver.suffixDropEmpty && journal.count() == 0) {
      journal.dropCollection()
      ...

Is there a risk that documents are inserted in collection between test and drop ?

gbrd avatar Oct 09 '18 14:10 gbrd

Fixed by #205 - released with v2.1.1. Thanks @gbrd!

scullxbones avatar Nov 01 '18 01:11 scullxbones

This one is independent and may not be fixed bar #205 right ?

gbrd avatar Nov 05 '18 08:11 gbrd

My mistake.

scullxbones avatar Nov 05 '18 13:11 scullxbones