-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Enable external configuration of DB storage size retention policy #77
chore: Enable external configuration of DB storage size retention policy #77
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
run_node.sh
Outdated
if [[ ! "${STORAGE_SIZE}" =~ ^[0-9]*\.?[0-9]+[MG]B$ ]]; then | ||
echo "Invalid STORAGE_SIZE value: \"${STORAGE_SIZE}\". Please use a valid size format (e.g. 1GB, 120MB, 1.5GB)." | ||
exit 1 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this if the node already spit an error with a wrong format as input?
It's more user friendly this way I guess...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I saw just this: waku-org/nwaku#2532
So I will remove this to allow to be checked in one place... more future proof you're right.
The user either case needs to check the logs ....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
We should probably also add this variable to https://github.com/waku-org/nwaku-compose/blob/master/.env.example and https://github.com/waku-org/nwaku-compose/blob/master/ADVANCED.md
Thank you for draw attention on it. I added the description and .env placeholder. |
Add STORAGE_SIZE config to enable storage size retention externally, deafult to 1GB
We think regular users may not accept several / dozens of GB databases created on their disks while try waku node via nwaku-compose.
With the new better managed Postgress db size retention mechanism it is better to set some lower DB size limit by default (1GB) which still allows several hours of messages to be stored and yet allow operator / testers to set allowed DB size to their needs.
This command can be used with this PR:
STORAGE_SIZE=1500MB docker compose up -d