MManager相关
任一MManager成员
TsStatus createTimeSeries(CreateTimeseriesPlan plan);
以该 plan 对应的操作编号作为该时间序列的version,其余行为与单机 MManager 保持一致
List<ShowTimeseriesResult> showTimeSeries(ShowTimeseriesPlan plan);
每个时间序列的结果会附带其 version,其余行为与单机 MManager 保持一致
TsStatus deleteTimeseries(DeleteTimeseriesPlan plan);
在该 MManager 中将对应时间序列删除
TsStatus deleteStorageGroup(DeleteStorageGroupPlan plan);
对于 plan 中的每一个 SG sg
删除 sg 对应的元数据,并将该 sg 的 max removed version 置为 plan 中对应的 version,将 sg 的 version 置为 null
Data相关
任一Data成员
TsStatus deleteTimeseries(DeleteTimeseriesPlan plan);
在该 VSG 中将被删除时间序列的元数据缓存和对应数据删除,并将该 plan 对应的操作编号记录到被删除时间序列的 max removed version
TsStatus deleteStorageGroup(DeleteStorageGroupPlan plan);
对于 plan 中的每一个 SG sg
删除 sg 对应的所有 vsg 的数据以及元数据缓存,并将该 sg 的 max removed version 置为 plan 中对应的 version,将 sg 的 version 置为 null
对于 sg 对应的所有 vsg
使 vsg 进入只读状态
对于每个 vsg,如果其在该 plan 之后仍有已提交但尚未执行的 plan,为其设置一个 STORAGE_GROUP_DELETED 异常
停止 vsg 所有相关线程,删除该 vsg
备注:考虑到采用 Quorum 机制时,可能出现某个 VSG 内仅有部分节点提交并执行该操作,使得该 VSG 剩余节点数不过半,其余节点无法选出 LEADER 也无法提交并执行该 plan 的情况,在节点发生 FOLLOWER 超时并触发选举时,如果接收选举请求者发现该 VSG 已经被删除,则通知选举发起人 VSG 已删除,选举发起人将删除本地的 VSG。
- 负载均衡相关
- 实时负载调度、统计负载调度
- TSStatus addDeviceGroup(int vsgID, int deviceGroupID);
告知 VSG 接下来要管理指定的 DeviceGroup - TSStatus moveDeviceGroup(int vsgID, int targetVSG, int deviceGroupID);
将 VSG 管理的某个 DeviceGroup 交给另一 VSG 管理
- TSStatus addDeviceGroup(int vsgID, int deviceGroupID);
- 数据迁移
- 碎片清扫
- TSStatus moveDataSlice(int vsgID, int targetVSG, int deviceGroupID, TimeInterval timeInterval)
将 VSG 管理的一个设备组的一个时间分区数据迁移到另一 VSG,以清扫实时负载调度产生的分区碎片
- TSStatus moveDataSlice(int vsgID, int targetVSG, int deviceGroupID, TimeInterval timeInterval)
- 分区聚集
- TSStatus mergeDataBlock(int vsgID, int deviceGroupID, TimeInterval timeInterval)
将 VSG 管理的一个设备组在指定分区内的数据块合并
- TSStatus mergeDataBlock(int vsgID, int deviceGroupID, TimeInterval timeInterval)
- DataRegion-共识组分配
- TSStatus createVSG(int vsgID);
为 DataNode 创建一个 VSG - TSStatus moveVSG(int vsgID, int targetDataNode);
将 DataNode 管理的某个 VSG 交给另一 DataNode
- TSStatus createVSG(int vsgID);
- 碎片清扫
- 实时负载调度、统计负载调度