Restarting of aerospike server reading older value
Asked Answered
D

2

7

I am using aerospike cluster with storage mechanism SSD. I have updated some key but when i restarted aerospike cluster it restoring previous value in place of new value.

WritePolicy writePolicy = new WritePolicy();
writePolicy.recordExistsAction = RecordExistsAction.UPDATE;
writePolicy.generationPolicy = GenerationPolicy.NONE;
Bin whiteList = Bin.asNull("bin1");
Bin blackList = Bin.asNull("bin2");

client.put(writePolicy, key, whiteList, blackList);

I just want last updated value for given key after server restart in place of older value.

How can i handle this case?

Demitria answered 5/4, 2016 at 12:3 Comment(3)
Is this happening all the time or on coldstart only?Herrle
Hi @BenBates i checked it for coldstart. Fast start is only available for enterprise edition but currently i am using Community Edition. Is there any other way to do this in Community Edition?Demitria
No, this is most likely going to be your issue. Durable deletes are on the roadmap for this year, which would be the way forward. I do not know - at this stage - whether this would be an Enterprise only feature.Herrle
H
1

I suspect you are hitting a well documented behaviour on cold starts as described here:

https://discuss.aerospike.com/t/expired-deleted-data-reappears-after-server-is-restarted/470/2

When Aerospike cold starts it reads data back from disk. When a record is deleted the reference to that record is removed from the index. When looking at the disk in isolation the database has no way of knowing if the record it reads from disk is deleted (as the index is in memory and by definition unavailable)

For this reason 'ghost' records can seem to re-appear on cold start. This is going to be addressed very soon with 'durable' deletes.

Herrle answered 26/4, 2016 at 10:55 Comment(0)
B
0

One possible answer may be that the nodes in the cluster are not in sync and value fetching from a non-updated node. So make sure you got synced all the nodes in the cluster before executing query.

Brooking answered 30/5, 2016 at 10:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.