I have an application that’s performing a pile of upserts. So many that an asynchronous approach is necessary to keep on a reasonable business schedule. The easy way to do this was to take advantage of the job handling built into the AsyncClient.
Upsert starts with AsyncClient.read using a ReadListener that potentially modifies the values in a key’s bin and then calls AsyncClient.put if something has changed. The WriteListener just provides some information and exits (mostly keeping a count of running threads for the parent thread). Both Listeners provide retry callbacks from OnFailure, but only a limited number.
What I’ve found is that when AsyncClient.put is called, OnSuccess is fired but nothing is written. Even worse, setting the RecordExistsAction to REPLACE successfully deletes the bin from the key.
Using the synchronous version of AsyncClient.put works (meaning records are written).
What am I doing wrong? Is this a bug?
Senior Software Engineer