[ 
https://issues.apache.org/jira/browse/IOTDB-460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17070677#comment-17070677
 ] 

WangChao commented on IOTDB-460:
--------------------------------

I think slot could has three info like following.

slot -> (state, source, destination)
state -> normal, rebalance

when a slot is rebalancing, it has following info.

slot -> (rebalance, source, destination)


when destination finished pulling the slot, it should start a raft log to chang 
the slot state from rebalance to normal.

slot -> (normal, source, null)


source should check the slot's state, if slot is normal and source is not owned 
by him, it could delete it.


So, we only support a change once time, like delete a node or add a node. Only 
when all slots finished tranfer, we could do next change.

> [Distributed]Remove data of outdated slots
> ------------------------------------------
>
>                 Key: IOTDB-460
>                 URL: https://issues.apache.org/jira/browse/IOTDB-460
>             Project: Apache IoTDB
>          Issue Type: Improvement
>            Reporter: Tian Jiang
>            Priority: Major
>              Labels: data-transfer, distributed
>
> In node addition/removal, the slots managed by a node will change. However, 
> the data of corresponding slots cannot be removed yet because the new holders 
> of the slots will pull such data to themselves. As the data pulling is issued 
> by the new holders randomly, it is hard for the previous holders to find out 
> when will the data be needless. As a result, the previous holder cannot 
> delete the local data with confidence.
> It will be necessary to find a way for the previous holders to know when the 
> data has been replicated to the new holders so that they will be able to 
> remove the local data.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to