Hi Pratyyy,
regarding your questions:
-
No, only when using BETWEEN.
-
We have inserted the keys through aerospike_put (by using the C client library)
-
The operations we typically do (apart from the initial bulk insert of the records using
aerospike_key_put) are: -
we run a query that selects on
as_integer_equals(0)for thein_usefield (w/ corresponding index). The callback for this query selects the string value in thekeybin and returns it to the caller through the user data parameter and returnsfalseto stop the query -
after the foreach-query returns, we do an
aerospike_key_getusing the returned key to select that record. -
next, we re-write that record with the
in_usefield set to (integer) 1 and with aAS_POLICY_GEN_EQto ensure the record wasn’t modified in between -
if the latter operation fails, we retry the whole procedure (up to a certain defined maximum)
Additionally, we have an operation to empty a set (having an API call for this would be highly appreciated, by the way!) that works by iterating over all the records in a set and, in its callback, will re-write that record with a TTL of 1 (we had a tombstoning bug with this previously) and subsequently calls aerospike_key_remove. We have been using this code for quite a while and have verified that it indeed removes the records. It might be that this operation has been called once (or more) on the mentioned set.