gocql
gocql copied to clipboard
Mutex token aware sharding initializer
- Prevents data race when/if a schema update happens during an initialization.
I believe this addresses #94.
@mmatczuk - One for you, It seems pretty safe to call the mutex here, and it stops the issues fine in my CI runs locally. I've got a lot of tests where I set up keyspaces, do a bunch of operations then blow away the keyspace so each test is idempotent. I doubt this will happen to anyone in the wild, and will have been an issue for a long while I suspect. If I re-run CI enough, tests will pass.