-
Notifications
You must be signed in to change notification settings - Fork 663
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
MEMORY DOCTOR/MALLOC-STATS in loading phase #1299
Comments
The command with flag "LOADING" indicates that this command has no any interaction with the data set. |
@hwware Understood about LOADING being defined as a flag for commands not interacting with the dataset. |
I think we can allow this, it shouldn't be a breaking change, @knggk do you want to open a PR? We might also want to take a look at similar commands to see which ones we should enable so we stop flipping them one at a time :) |
Agree...I was thinking doing all memory commands. One additional question: any pointers on how to unit test this assuming we want to? |
@knggk I think it's fine to write a tcl test and slowdown the rdb loading via |
I will look into TCL + key-load-delay. Thanks @hpatro! |
I've moved all memory commands to be allowed during loading EXCEPT for memory usage key, because that one works on key and was always returning empty on any key during loading. It's also directly interacting with the dataset, which we want to disallow during loading as per @hwware. Let me know your thoughts on the PR. |
Honestly said, I have a little bit concern to allow run command "memory stats" during loading, because it costs a lot of resources and involves key issues. (key count, key used memory). Can we just allow the other 3 commands to be called during loading process? |
Ok, I do see
as part of the memory stats doc. (I don't know that it costs a lot of resources though.) I can remove memory stats from the commands allowed during loading. That would leave us with |
I would also remove memory doctor. I think it might give weird results when run during loading. The other two seem fine to me. |
I've made the requested changes to the PR as per the feedback. |
The problem/use-case that the feature addresses
Sometimes I wish to investigate memory issues during the loading phase. However I get:
Description of the feature
I would like to see the memory details provided by these commands during loading
Additional information
The check seems to be here https://github.com/valkey-io/valkey/blob/unstable/src/server.c#L4176-L4181:
The question: Is there specific reasons those commands are disallowed during loading?
If not, is it as simple as adding CMD_LOADING flag to all the MEMORY commands, or there are considerations to take into account for making this work?
The text was updated successfully, but these errors were encountered: