Skip to content
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

[BUG] redis-cli --csv BGSAVE/LASTSAVE do not return ERROR Message ( out of disk ) #7346

Open
AhmedMItman opened this issue May 30, 2020 · 2 comments

Comments

@AhmedMItman
Copy link

I was trying to take database dump using:

redis-cli --csv BGSAVE
CURR_DATE=$(date +%s)
while true; do
	# LASTSAVE returns epoch of last successfull background dump process
	LAST_SAVE=$(redis-cli  --csv LASTSAVE)
	[ "$LAST_SAVE" -ge "$CURR_DATE" ] && break || sleep 30
done

It did not exit from While loop, because LAST_SAVE did not change and it tried to save data into disk,but it failed

Reason:
Their was not an available Storage space, and Redis was trying to put new dump data.

Suggestion:
Their should be a time out with error message Server out of disk, and program should exit with error code

@itamarhaber
Copy link
Member

Hello @AhmedMItman

I don't agree this is a bug with the cli. Your script could be improved to detect a faulty save by calling INFO persistence and looking at the 'rdb_last_bgsave_status' field.

Their should be a time out

What time out? Both BGSAVE and LASTSAVE return immediately.

with error message Server out of disk

The error is output to the log.

and program should exit with error code

Which program?

@AhmedMItman
Copy link
Author

Hi @itamarhaber
Sorry for the late response,
Program : Jenkins Linux Shell
I will try INFO persistence with my script and i will back to you
Thanks a million

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants