pika icon indicating copy to clipboard operation
pika copied to clipboard

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

Open chejinge opened this issue 10 months ago • 9 comments

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

No response

Description

参考咨询Alice.g

Proposed solution

参考咨询Alice.g

Alternatives considered

参考咨询Alice.g

chejinge avatar Mar 31 '24 11:03 chejinge

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

Issues-translate-bot avatar Mar 31 '24 11:03 Issues-translate-bot

@sunjiajun

AlexStocks avatar Apr 26 '24 12:04 AlexStocks

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


@SunJiajun

Issues-translate-bot avatar Apr 26 '24 12:04 Issues-translate-bot

整体思路:

  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 的相关逻辑

EnableAsync avatar May 10 '24 09:05 EnableAsync

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

Issues-translate-bot avatar May 10 '24 09:05 Issues-translate-bot

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

chejinge avatar May 11 '24 02:05 chejinge

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.

Issues-translate-bot avatar May 11 '24 02:05 Issues-translate-bot

@baerwang

chejinge avatar Jun 06 '24 07:06 chejinge

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


@baerwang

Issues-translate-bot avatar Jun 06 '24 07:06 Issues-translate-bot