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

Remove master and slave from source code #591

Merged
merged 11 commits into from
Jun 7, 2024
Merged

Conversation

PingXie
Copy link
Member

@PingXie PingXie commented Jun 3, 2024

External facing interfaces are not affected.

Signed-off-by: Ping Xie <pingxie@google.com>
Signed-off-by: Ping Xie <pingxie@google.com>
Signed-off-by: Ping Xie <pingxie@google.com>
Signed-off-by: Ping Xie <pingxie@google.com>
Signed-off-by: Ping Xie <pingxie@google.com>
Signed-off-by: Ping Xie <pingxie@google.com>
Signed-off-by: Ping Xie <pingxie@google.com>
Copy link

codecov bot commented Jun 3, 2024

Codecov Report

Attention: Patch coverage is 75.51440% with 119 lines in your changes missing coverage. Please review.

Project coverage is 70.26%. Comparing base (bce240e) to head (625d764).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #591      +/-   ##
============================================
+ Coverage     70.21%   70.26%   +0.04%     
============================================
  Files           110      110              
  Lines         59994    60007      +13     
============================================
+ Hits          42124    42161      +37     
+ Misses        17870    17846      -24     
Files Coverage Δ
src/blocked.c 91.45% <100.00%> (ø)
src/cluster_legacy.c 86.44% <ø> (+0.01%) ⬆️
src/db.c 88.32% <100.00%> (ø)
src/debug.c 53.94% <100.00%> (ø)
src/evict.c 97.34% <100.00%> (ø)
src/hyperloglog.c 91.21% <ø> (ø)
src/logreqres.c 72.72% <ø> (ø)
src/replication.c 87.17% <ø> (+0.08%) ⬆️
src/script.c 86.61% <100.00%> (ø)
src/script_lua.c 90.14% <ø> (ø)
... and 16 more

... and 9 files with indirect coverage changes

@hwware
Copy link
Member

hwware commented Jun 3, 2024

Before begin to take look this huge PR, can we setup several step for this. My suggestion as below:

  1. Set master as primary the alias name (a new big change, but still backward compatible )
  2. Remove master and slave from source code
  3. Update some json files, output message, and logs
  4. Update .md file and our valkey.io website

I suggest even this PR is approved, do not merge yet until step 1 is done.

@PingXie
Copy link
Member Author

PingXie commented Jun 3, 2024

Before begin to take look this huge PR, can we setup several step for this. My suggestion as below:

  1. Set master as primary the alias name (a new big change, but still backward compatible )
  2. Remove master and slave from source code
  3. Update some json files, output message, and logs
  4. Update .md file and our valkey.io website

I suggest even this PR is approved, do not merge yet until step 1 is done.

@hwware I think 2 should be done first and this is what this PR is about. It should not impact any code behavior. thoughts?

@PingXie
Copy link
Member Author

PingXie commented Jun 3, 2024

Also I don't think we can do much about 1 and 3 in the foreseeable future so really the order IMO is

2,4,1,3

with 2 being the safest and should be done sooner rather than later (due to the sheer size of the change).

@hwware
Copy link
Member

hwware commented Jun 3, 2024

Before begin to take look this huge PR, can we setup several step for this. My suggestion as below:

  1. Set master as primary the alias name (a new big change, but still backward compatible )
  2. Remove master and slave from source code
  3. Update some json files, output message, and logs
  4. Update .md file and our valkey.io website

I suggest even this PR is approved, do not merge yet until step 1 is done.

@hwware I think 2 should be done first and this is what this PR is about. It should not impact any code behavior. thoughts?

My concern is developers have no idea where the term "primary" comes from (although most people can understand, primary is almost master)

@PingXie
Copy link
Member Author

PingXie commented Jun 3, 2024

My concern is developers have no idea where the term "primary" comes from (although most people can understand, primary is almost master)

We did document it in the source code already -

* - Terminology has been updated to be more inclusive: "slave" is now "replica", and "master"

But yeah I think we should scrub the documentation too

@hwware
Copy link
Member

hwware commented Jun 3, 2024

No problem, let us first go through this pr and then discuss other steps.

@@ -1073,7 +1073,8 @@ void flushAppendOnlyFile(int force) {
* (because there's no reason, from the AOF POV, to call fsync) and then WAITAOF may wait on
Copy link
Member

Choose a reason for hiding this comment

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

I notice in this pr, you update comment as well, pls update the above line master_repl_offset to primary_repl_offset

@@ -1365,9 +1366,9 @@ struct client *createAOFClient(void) {
*/
Copy link
Member

Choose a reason for hiding this comment

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

pls update line 1358 "master"

@@ -2408,7 +2409,7 @@ int rewriteAppendOnlyFileBackground(void) {

Copy link
Member

Choose a reason for hiding this comment

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

line 2406

PingXie and others added 2 commits June 7, 2024 00:29
Signed-off-by: Ping Xie <pingxie@google.com>
PingXie pushed a commit that referenced this pull request Jun 7, 2024
)

Make the one backwards compatible config change we are allowed to
replace for removing master from our API.

`masterauth` and `masteruser` are still used as an alias, but aren't
explicitly referenced. As an addendum to
#591, it would be good to have
this in 8. Given the related PR for updated other references for master,
I just updated the ones around this specific change.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
@hwware
Copy link
Member

hwware commented Jun 7, 2024

Let us merge and then document it.

@PingXie PingXie merged commit 54c9747 into valkey-io:unstable Jun 7, 2024
18 checks passed
advaMosh pushed a commit to advaMosh/valkey that referenced this pull request Jun 10, 2024
…alkey-io#598)

Make the one backwards compatible config change we are allowed to
replace for removing master from our API.

`masterauth` and `masteruser` are still used as an alias, but aren't
explicitly referenced. As an addendum to
valkey-io#591, it would be good to have
this in 8. Given the related PR for updated other references for master,
I just updated the ones around this specific change.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Signed-off-by: Adva Moshkovitz <advamo7@gmail.com>
advaMosh pushed a commit to advaMosh/valkey that referenced this pull request Jun 10, 2024
External facing interfaces are not affected.

---------

Signed-off-by: Ping Xie <pingxie@google.com>
naglera pushed a commit to naglera/placeholderkv that referenced this pull request Jun 10, 2024
…alkey-io#598)

Make the one backwards compatible config change we are allowed to
replace for removing master from our API.

`masterauth` and `masteruser` are still used as an alias, but aren't
explicitly referenced. As an addendum to
valkey-io#591, it would be good to have
this in 8. Given the related PR for updated other references for master,
I just updated the ones around this specific change.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
naglera pushed a commit to naglera/placeholderkv that referenced this pull request Jun 10, 2024
External facing interfaces are not affected.

---------

Signed-off-by: Ping Xie <pingxie@google.com>
@PingXie PingXie deleted the names branch June 13, 2024 18:22
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.

None yet

2 participants