I’m using GridDB with the Java API in a multi-threaded application where multiple threads may insert or update data at the same time.
Each record uses a timestamp as the row key. A simplified example:
SensorData row = new SensorData();
row.timestamp = new Timestamp(System.currentTimeMillis());
container.put(row);
In some situations, two threads generate the same timestamp and attempt to write to the same row key. When this happens, I sometimes see data being overwritten, which is not desirable in my use case.
From what I understand, GridDB allows put() operations to overwrite existing rows with the same key, but I want to better understand the correct approach for handling this scenario.