How long does the server hold data for a RecordSet?

Hi,

I’m using the java AerospikeClient to execute a query.

As I understand it, the server will stream the records into the RecordSet as long as the RecordSet is not full. Once full the server will hold on to the remaining records until such time the RecordSet has some free capacity.

Is the above correct? If so, how long will the server hold on to the unsent records?

The reason I ask is the query we will be executing may result in a large set of records and the consumption of all the records may take a few hours or longer.

Thanks.

Regards,

The query threads populate the records in RecordSet queue until the cache is filled (default is 5000 record cache). After that, the query threads will block until records are consumed. The user thread simultaneously consumes records from the RecordSet queue. As long as you are always consuming records without delay, you should be fine.

If you are not consuming records, the server will not be able to finish the query which leads to congestion. The server will eventually close the connection if it’s deemed inactive. This may occur after 1 minute. The client can also close the connection if a client timeout is specified. If the connection is closed, the remaining data will not be available.

Thanks for the clarification.

1 Like