Record layer: deleteRecordsWhere

I am trying to get deleteRecordsWhere (and the async variant) to work but I am running into trouble. It seems that it works pretty different than query and isn’t maybe as well covered with tests? I am not criticizing just looking for advice.

In particular, trying to get delete to work well I had to effectively use recordType as a primary key prefix for all the nodes. This seems to be the best practice anyway, and makes the most sense (imo). However, once I did that, it wouldn’t allow me to delete anything that wasn’t an exact key match.

I stepped through the RecordWhereDeleter and it is throwing with the following conditions:

Here’s an example of a simple record type:

RecordType {'Snapshot', [RecordTypeKey, Field { 'persistenceId' None}, Field { 'sequenceNr' None}, Field { 'timestamp' None}]}

Here’s the QueryComponent (serialized) that I was trying to use

And([IS Snapshot, persistenceId EQUALS pid1, sequenceNr LESS_THAN 9223372036854775807, sequenceNr GREATER_THAN_OR_EQUALS 0, timestamp LESS_THAN 9223372036854775807, timestamp GREATER_THAN_OR_EQUALS 0])

But match == NO_MATCH, so it’s throwing here fdb-record-layer/fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/provider/foundationdb/FDBRecordStore.java at 4a440d27380e7429cbbcc917ef4d548be3df3f79 · FoundationDB/fdb-record-layer · GitHub

I guess I am wondering is it fine to forgo using this and generate queries, then iterate and delete specific records. There isn’t going to be a ton of deleting so I’d rather just move on from thinking about this, as the rest of the layer system seems to be pretty rock solid.