aerospike-server | Aerospike Database Server – | Database library
kandi X-RAY | aerospike-server Summary
kandi X-RAY | aerospike-server Summary
Welcome to the Aerospike Database Server source code tree!.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of aerospike-server
aerospike-server Key Features
aerospike-server Examples and Code Snippets
Community Discussions
Trending Discussions on aerospike-server
QUESTION
I wanted to avoid using Aerospike clients (e.g. for Python) and delete records from a set using native asinfo command 'truncate' as it allows to do it quickly. But after I restarted Aerospike all deleted records were back. I saw this aerospike: delete all record in a set but it doesn't answer my question. Neither does this page from AS docs. It says, that a tombstone should be written after a durable delete, do I have to create it manually or are there some other ways?
UPD: Thanks to @kporter who provided the accepted answer below I was able to look into differences between Community and Enterprise edition of Aerospike and found more information on the problem, some may find it helpful as well:
- Persisted Delete [Community Edition]
- This answer and the whole discussion from AS forum
- And this thread
If I understood all of it correctly the best way to get your records deleted completely in CE is to ensure that they have right TTL and can expire naturally. And if for some reason you have a lot of old records without TTL as in my case, you can issue truncate command via asinfo and do not restart AS server until data on SSD is eventually overwritten. Or just truncate sets with old records on every restart.
Also I wonder if it is possible to wipe AS storage completely and then restore it from a backup of already truncated data as an emergency measure?
UPD1: So, I was able to wipe SSD with Aerospike storage and restore only needed records from a backup. Here is how I did it:
- Firstly, you need to remove old records from sets via asinfo and truncate command, links to docs are above
- Then backup namespaces you want to save with asbackup
- Stop your AS server, mine was in Docker container, so I just stopped said container
- Zero out the disk that is used as AS storage, mine was /dev/sdb
- Create necessary partitions on this disk
- Start AS server
- Restore data from the backup using arestore
Useful links: how to remove and clean up an aerospike server installation, AS docs on SSD setup
I am not sure if it is a good solution for large production setups but it worked as intended in my case with only one AS node and an opportunity to stop it for a while. This way I was able to reduce the size of data in my AS from 160Gb to 11Gb and because of that my server now fully restarts only in half an hour instead of approximately eight hours as before.
...ANSWER
Answered 2020-Mar-10 at 18:31You can find more information about truncating a set here: https://www.aerospike.com/docs/operations/manage/sets/
As mentioned there, truncation is not durable in Aerospike Community.
In the Enterprise Edition, truncation is durable and preserves record deletions through a cold-restart. In the Community Edition, similar to record deletes, records in previously truncated sets are not durable and deletes can return through a cold-start.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aerospike-server
Note: You can use the -j option with make to speed up the build on multiple CPU cores. For example, to run four parallel jobs:.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page