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

slot auto split, solve the problem of too many preset slots #2564

Open
chejinge opened this issue Mar 31, 2024 · 9 comments
Open

slot auto split, solve the problem of too many preset slots #2564

chejinge opened this issue Mar 31, 2024 · 9 comments
Assignees
Labels
✏️ Feature New feature or request

Comments

@chejinge
Copy link
Collaborator

Which PikiwiDB functionalities are relevant/related to the feature request?

No response

Description

参考咨询Alice.g

Proposed solution

参考咨询Alice.g

Alternatives considered

参考咨询Alice.g

@chejinge chejinge added the ✏️ Feature New feature or request label Mar 31, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: slot auto split, solve the problem of too many preset slots

@chejinge chejinge changed the title slot auto split ,解决预设slot过多的问题 slot auto split, solve the problem of too many preset slots Mar 31, 2024
@AlexStocks
Copy link
Collaborator

@sunjiajun

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


@sunjiajun

@EnableAsync
Copy link

整体思路:

  1. 修改 maxSlotNum 变量
  2. 重新调用 SlotsRebalance 方法更新 slots(当前测试存在问题,需要对 SlotsRebalance debug)

具体思路:

  1. 修改 model.initSlotNum 的类型为 sync.Mutex
  2. 修改 SetMaxSlotNum 方法
  3. 在 Dashboard 中添加 SetMaxSlotNum(num int) 方法允许设置 maxSlotNum
  4. debug SlotsRebalance 方法实现 slot 重新划分
  5. 修改 codis-fe 中 slot 的相关逻辑

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


the whole idea:

  1. Modify maxSlotNum variable
  2. Recall the SlotsRebalance method to update slots (there is a problem in the current test and SlotsRebalance needs to be debugged)

Specific ideas:

  1. Modify the type of model.initSlotNum to sync.Mutex
  2. Modify the SetMaxSlotNum method
  3. Add SetMaxSlotNum(num int) method in Dashboard to allow setting maxSlotNum
  4. debug SlotsRebalance method to implement slot re-division
  5. Modify the relevant logic of slot in codis-fe

@chejinge
Copy link
Collaborator Author

思路没问题 需要注意的是 pika和codis都需要修改config配置,另外迁移数据需要打开slotmigrate及slotsreload

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


The idea is OK. It should be noted that both pika and codis need to modify the config configuration. In addition, to migrate data, slotmigrate and slotsreload need to be turned on.

@chejinge
Copy link
Collaborator Author

chejinge commented Jun 6, 2024

@baerwang

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


@baerwang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ Feature New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants