Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Some systems have a very small
/dev/shm
.For example, docker's default
/dev/shm
size is 64 MB: Hit by size limit of /dev/shm docker-library/postgres#416And
/dev/shm
isn't really intended for applications to store arbitrary-sized temporary files. It's meant to be used as a file-based interface to shared memory for inter-process communication.We copied a bunch of complex code from sled, which we don't really need.
(We also didn't credit the author, which is required under the MIT and Apache licenses.)
To help users identify orphaned Zebra temporary directories, we should prefix them with "zebra", the state version, and the network.
Solution
The code in this pull request has:
Review
@yaahc wrote this code.
This review is not urgent.
This bug could cause errors on long-running ephemeral tests in docker containers with the default
/dev/shm
size. But we're not seeing those errors yet.Related Issues
This bug existed in sled, and we copied it across when we moved to RocksDB in #1325.