Skip to content

When DEBUG LOADAOF fails, return an error instead of exiting#11790

Merged
oranagra merged 1 commit intoredis:unstablefrom
enjoy-binbin:debug_loadaof_return_error
Feb 9, 2023
Merged

When DEBUG LOADAOF fails, return an error instead of exiting#11790
oranagra merged 1 commit intoredis:unstablefrom
enjoy-binbin:debug_loadaof_return_error

Conversation

@enjoy-binbin
Copy link
Contributor

@enjoy-binbin enjoy-binbin commented Feb 8, 2023

Return an error when loadAppendOnlyFiles fails instead of
exiting. DEBUF LOADAOF command is only meant to be used by
the test suite, and only by tests that generated an AOF file
first. So this change is ok (considering that the caller is
likely to catch this error and die).

This actually revert part of the code in #9012, and now
DEBUG LOADAOF behaves the same as DEBUG RELOAD (returns an
error when the load fails).

Plus remove a after 2000 in a test, which can save times (looks like copy paste error).

Return an error when loadAppendOnlyFiles fails instead of
exiting. DEBUF LOADAOF command is only meant to be used by
the test suite, and only by tests that generated an AOF file
first. So this change is ok (considering that the caller is
likely to catch this error and die).

This actually revert part of the code in redis#9012, and now
DEBUG LOADAOF behaves the same as DEBUG RELOAD (returns an
error when the load fails).

Plus remove a `after 2000` in a test, which can save times.
@enjoy-binbin enjoy-binbin requested a review from oranagra February 8, 2023 08:12
@oranagra oranagra merged commit 66bed3f into redis:unstable Feb 9, 2023
@enjoy-binbin enjoy-binbin deleted the debug_loadaof_return_error branch February 9, 2023 06:18
enjoy-binbin added a commit to enjoy-binbin/redis that referenced this pull request Jul 31, 2023
…1790)

Return an error when loadAppendOnlyFiles fails instead of
exiting. DEBUF LOADAOF command is only meant to be used by
the test suite, and only by tests that generated an AOF file
first. So this change is ok (considering that the caller is
likely to catch this error and die).

This actually revert part of the code in redis#9012, and now
DEBUG LOADAOF behaves the same as DEBUG RELOAD (returns an
error when the load fails).

Plus remove a `after 2000` in a test, which can save times (looks like copy paste error).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants