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

Kvrocks sends negative ttl while migrating slot #891

Closed
2 tasks done
ellutionist opened this issue Sep 19, 2022 · 5 comments
Closed
2 tasks done

Kvrocks sends negative ttl while migrating slot #891

ellutionist opened this issue Sep 19, 2022 · 5 comments
Labels
bug type bug

Comments

@ellutionist
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar issues.

Version

OS:
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04

Kvrocks:
v2.1.0

Minimal reproduce step

  1. Create a kvrocks cluster of 2 nodes:
127.0.0.1:6666> cluster nodes
KEp2lfd524nItcLDNm=nkrTgxxRa2OnyfCorGqiw 127.0.0.1:6666@16666 myself,master - 1663582260999 1663582261000 1 connected 0-8191
iv3zxA39N1kXg23BmGAchLynaNCG2K284QvpgklT 127.0.0.1:6667@16667 master - 1663582260999 1663582261000 1 connected 8192-16383
  1. Set a key into one node, which expres in 5 seconds:
127.0.0.1:6666> set key00000000000000007100 key00000000000000007100 ex 5
OK
  1. Check the slot:
127.0.0.1:6666> cluster keyslot key00000000000000007100
(integer) 35
  1. After 5 seconds, migrate the slot to the other node, the migration will fail:
127.0.0.1:6666> clusterx migrate 35 iv3zxA39N1kXg23BmGAchLynaNCG2K284QvpgklT
OK
127.0.0.1:6666> cluster info
cluster_state:ok
cluster_slots_assigned:16384
cluster_slots_ok:16384
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:2
cluster_size:2
cluster_current_epoch:1
cluster_my_epoch:1
migrating_slot: 35
destination_node: iv3zxA39N1kXg23BmGAchLynaNCG2K284QvpgklT
migrating_state: fail
  1. Error log:
E20220919 18:14:55.837342 639656 slot_migrate.cc:495] [migrate] Got invalid response: -ERR invalid expire time, line length: 24
E20220919 18:14:55.837354 639656 slot_migrate.cc:793] [migrate] Wrong response
E20220919 18:14:55.837363 639656 slot_migrate.cc:320] [migrate] Failed to send left data in pipeline
E20220919 18:14:55.837378 639656 slot_migrate.cc:182] [migrate] Failed to send snapshot
I20220919 18:14:55.837489 639656 slot_migrate.cc:211] [migrate] Failed to migrate slot35
I20220919 18:14:55.837498 639656 slot_migrate.cc:380] [migrate] Clean resources of migrating slot 35

What did you expect to see?

Migrate success when executing cluster info.

What did you see instead?

Migrate failed.

Anything Else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@ellutionist ellutionist added the bug type bug label Sep 19, 2022
@git-hulk
Copy link
Member

Cool, thanks for your feedback.

@xiaobiaozhao
Copy link
Contributor

Looking forward to your PR

@caipengbo
Copy link
Contributor

Indeed, this is a bug. For expired keys, we should filter them out at the source side.

@tisonkun
Copy link
Member

tisonkun commented Oct 4, 2022

@ellutionist @git-hulk @caipengbo shall we close this issue as completed with #901?

@git-hulk
Copy link
Member

git-hulk commented Oct 4, 2022

Yes, sorry for forgetting this issue.

@git-hulk git-hulk closed this as completed Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug type bug
Projects
None yet
Development

No branches or pull requests

5 participants