My problem is that I am not getting immediate delete on single node Cassandra. The problem occurs only on Windows, when I run Cassandra in Docker container. There is no problem on Linux. I am using datastax driver to connect to Cassandra from Java application. Flow in test looks like:
- Insert single row to my_lock_table
- Modify schema (same keyspace, creating additional tables, it takes about 300ms)
- Delete row from my_lock_table by partition key
- Select row from my_lock_table by partition key - on Linux there is no result as I expected. But on Windows row that is supposed to be removed is returned by SELECT.
I tried several ways to find out the reason and:
- When I added IF EXISTS clause to the delete query, then it works properly row is gone instantly.
- I tried to delete row again, and it didn't help. It is strange because it doesn't matter how many times I call DELETE query - it will not work until 10 seconds have passed. And after 10 seconds since INSERT, if I call DELETE query again, then it works and the row is gone.
- I checked logs of cassandra, and timestamps of queries are in proper order.