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

chore: Remove template Callbacks #4431

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BagritsevichStepan
Copy link
Contributor

No description provided.

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
@BagritsevichStepan BagritsevichStepan self-assigned this Jan 8, 2025
@romange
Copy link
Collaborator

romange commented Jan 8, 2025

@BagritsevichStepan please see #4368
I do not understand why callback is needed at all

@BagritsevichStepan
Copy link
Contributor Author

@BagritsevichStepan please see #4368 I do not understand why callback is needed at all

It was used just to reduce boilerplate code. And we are now performing the same check twice:

if (!parsed_json) {
    VLOG(1) << "got invalid JSON string '" << json_str << "' cannot be saved";
    return OpStatus::INVALID_VALUE;
  }

@romange
Copy link
Collaborator

romange commented Jan 8, 2025

I think this is not justified to change interfaces of function to save a few lines. Moreover, it actually had a bug of copying a json object instead of moving it. With memory allocators is becomes a correctness bug where we probably loose the correct resource. All this is not worth it.

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

Successfully merging this pull request may close these issues.

2 participants