I am having some issues with the timeout specified getting ignored and as a result an AerospikeException due to timeout.
Specifically:
- Using client version 3.0.32 (have had issues with upgrades in the past)
- Specifically this occurs using the LargeSet udf, and the add function. The sets consist of unique ID’s. I’m aware that LargeSet is being pushed out in the latest server releases(which is part of why we’re somewhat dubious about moving to it as it is not a painless process)
- I have followed with the debugger down to SyncCommand.execute(). At this point the WritePolicy.timeout value is still correct. Beyond there the client side timeout operates off localtimeGetMillis() so trying to debug in real time doesn’t seem workable.
Here is the relevant code
public boolean writeSet(String date, String appPrefix, String setKey, Set<String> contents) {
Key key = getAeroSetKey(date, appPrefix, setKey);
Value[] values = new Value[contents.size()];
int i=0;
for(String curVal : contents) {
values[i++] = Value.get(curVal);
}
try {
LargeSet lset = new LargeSet(client, writePolicy, key, "lset", "small_set");
lset.destroy();
log.debug("writePolicy has timeout of " + writePolicy.timeout);
lset.add(values);
} catch (RuntimeException e) {
log.error("WriteSet failed: " + e.getMessage(), e);
return false;
}
return true;
}
Other commands appear to respect the timeout set in the policy
edit 2015/05/15: it appears that the data is in fact getting succesfully added and that the timeout error is in error?
16:16:26.103 [main] INFO j.c.recommend.cli.PartitionTask - Writing partition consisting of 18889
16:16:43.471 [main] ERROR j.c.r.cli.AerospikeOperations - WriteSet failed: Error Code 9: Timeout
com.aerospike.client.AerospikeException: Error Code 9: Timeout
at com.aerospike.client.command.ReadCommand.parseResult(ReadCommand.java:108)
at com.aerospike.client.command.SyncCommand.execute(SyncCommand.java:56)
…
Upon checking the db, the data is actually there:
aql> execute lset.size('lset') on guildmatch.tenkuri20150515 where pk='guild-partitions-1-3'
+-------+
| size |
+-------+
| 18889 |
+-------+