Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

eranhd
Copy link
Collaborator

@eranhd eranhd commented Jun 24, 2024

  1. Write to AOF outside the iterator
  2. Added notify_keyspace_event API to manager

2. Added notify_keyspace_event API to manager
@eranhd eranhd requested review from iddm and MeirShpilraien June 24, 2024 07:09
@CLAassistant
Copy link

CLAassistant commented Jun 24, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

@MeirShpilraien MeirShpilraien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
Few suggestions

};
if updated {
redis_key.apply_changes(ctx, "json.mset")?
redis_key.notify_keyspace_event(ctx, "json.mset")?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the separation you are doing here is right, manager should probably not handle the replication. But I believe we should make this separation all over the code, WDYT?
In addition, maybe we should find a more general name to it? Because on HDT it also need to apply the changes on the key and fire the effects.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how it's managed in redis? there are calling to replication and notify in the commands? or it's something that happened in the behind the scenes?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notify is per command.
Replication is a totally different mechanism.

@eranhd eranhd requested a review from ephraimfeldblum June 24, 2024 12:21
}
}

fn notify_keyspace_event(&mut self, ctx: &Context, command: &str) -> Result<(), RedisError> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're splitting the functionality of apply_changes then we should have it call notify_keyspace_event to reduce duplication. eg something like

fn apply_changes(&mut self, ctx: &Context, command: &str) -> Result<(), RedisError> {
    self
        .notify_keyspace_event(ctx, command)
        .inspect(|_| ctx.replicate_verbatim())
}

the apply change API call only to notify
MeirShpilraien
MeirShpilraien previously approved these changes Jun 25, 2024
@MeirShpilraien
Copy link

Let make sure to do the relevant changes on HDT as well.

Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.00%. Comparing base (113e482) to head (fd5adba).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1212      +/-   ##
==========================================
+ Coverage   77.59%   78.00%   +0.40%     
==========================================
  Files          14       14              
  Lines        3923     3996      +73     
==========================================
+ Hits         3044     3117      +73     
  Misses        879      879              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eranhd eranhd requested a review from MeirShpilraien July 3, 2024 09:20
Copy link

@MeirShpilraien MeirShpilraien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@eranhd eranhd merged commit 5ae9ad3 into master Jul 3, 2024
@eranhd eranhd deleted the eranhd_aof_duplicate_in_mset branch July 3, 2024 11:28
eranhd added a commit that referenced this pull request Jul 7, 2024
…_in_mset

MOD-7293 fix AOF commands duplicated in JSON.MSET

(cherry picked from commit 5ae9ad3)
@eranhd eranhd mentioned this pull request Jul 7, 2024
eranhd added a commit that referenced this pull request Jul 10, 2024
…_in_mset

MOD-7293 fix AOF commands duplicated in JSON.MSET

(cherry picked from commit 5ae9ad3)
(cherry picked from commit a290d1b)
eranhd added a commit that referenced this pull request Jul 10, 2024
* Merge pull request #1211 from RedisJSON/ephraim_update-base-rdbs-url

- update s3 bucket url
- fix coverage test failure
- fix asan build failure

(cherry picked from commit b7e1f35)

* MOD-7293 Merge pull request #1212 from RedisJSON/eranhd_aof_duplicate_in_mset

MOD-7293 fix AOF commands duplicated in JSON.MSET

(cherry picked from commit 5ae9ad3)
(cherry picked from commit a290d1b)

* MOD-7342 fix centos7&amzn2 build (#1214)

(cherry picked from commit 0a1de82)
(cherry picked from commit dd3c33c)
eranhd added a commit that referenced this pull request Jul 10, 2024
…_in_mset

MOD-7293 fix AOF commands duplicated in JSON.MSET

(cherry picked from commit 5ae9ad3)
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.

4 participants