Stop-writes failure condition in namespace storage engine for repeatable development
0 reputation · 04 Apr 2025, 22:33 UTC
0 reputation · 04 Apr 2025, 22:33 UTC
Goal is a repeatable local development environment for Aerospike Server where namespace configuration and storage engine behavior are predictable across restarts and resource constrained runs.
Constraints include small memory or disk limits to surface resource pressure, choice between in-memory and persistent storage per namespace, and single-node cluster defaults that affect client routing and partition maps. Stop-writes failure condition in the namespace storage engine engages when high-water thresholds are exceeded, rejecting writes until usage falls.
Behavior of high-water marks and stop-writes is version sensitive and depends on storage engine type and namespace settings. Community versus Enterprise feature sets differ for persistence and monitoring, affecting reproducibility assumptions.
What namespace storage engine parameters define stop-writes engagement for memory and disk high-water thresholds in a single-node dev setup? Does persistence mode change the reproducibility of stop-writes across restarts? Should replication factor one with a single node be pinned for repeatable tests, or does multi-node emulation change failure visibility?
34775 reputation · 05 Apr 2025, 04:24 UTC
For a single-node Aerospike development environment, the stop-writes engagement parameters are:
memory-high-water and memory-low-water (values in MB or percentage depending on version)device-high-water and device-low-water (percentage of configured device capacity)Persistence mode does not change the threshold evaluation logic, but it determines which metric can trigger stop-writes. Memory-only namespaces respond only to memory pressure; hybrid namespaces may trigger on either memory or device usage, whichever threshold is crossed first.
Pin replication-factor 1 with a single node for repeatable tests. Multi-node emulation does not alter per-node threshold logic, but it changes partition map distribution and client routing, which can make stop-writes appear at different times or on different nodes for the same workload.
namespace test {
memory-size 256M
memory-high-water 80 # percentage (6.x/7.x) or MB (5.x)
memory-low-water 60 # percentage or MB
storage-engine memory
}namespace test {
memory-size 128M
memory-high-water 80
memory-low-water 60
storage-engine device {
file /opt/aerospike/data/test.dat
filesize 512M
device-high-water 80 # percentage of filesize
device-low-water 60
}
}Version note: Aerospike 5.x uses absolute MB for memory thresholds; 6.x and 7.x default to percentages of memory-size. Device thresholds have always been percentages of filesize. Check your server version with asd --version before assuming units.
Stop-writes state is ephemeral. On asd restart:
Persistence mode affects which resource pressure triggers stop-writes, not whether the condition survives restart. For repeatable tests, script the same load pattern against the same thresholds after every restart.
Use a single node with replication-factor 1 for deterministic stop-writes behavior. In this configuration:
Multi-node clusters (even with RF=1) introduce partition map distribution, client routing via partition awareness, and potential cross-node effects that change when and where stop-writes becomes visible for the same namespace configuration.
memory-high-water 60 (or a low MB value in 5.x), write records until the client receives AEROSPIKE_ERR_STOP_WRITES (result code 153), then delete records or wait for eviction to drop below memory-low-water and confirm writes resume.device-high-water 70, write until stop-writes engages, then verify release below device-low-water.asd and confirm usage counters show zero (check asinfo -v 'namespace/test' for memory_used_bytes=0 or device_used_bytes=0). If counters persist, check for flash-cache files or device state retention.What Aerospike server version are you running? The threshold units (MB vs percentage), default values, and whether memory-high-water accepts percentages changed between 5.x, 6.x, and 7.x. This changes the exact configuration syntax and default behavior for repeatable tests.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.