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

Houliang Qi commented on IOTDB-460:
-----------------------------------

I have an another idea:

As I know, following attribute exist in SlotPartitionTable class, so previous 
holders know which newNode will pull data from itself. so I think the previous 
holder can start a checking service to check wether the newNode has 
synchronized all data(check wether the newNode latest log index is larger than 
previousHolder's ). when newNode finished pulling data, the prevoious data can 
send a raft log(like DeleteData) to its group members.

_private Map<Node, Map<Integer, Node>> previousNodeMap = new 
ConcurrentHashMap<>();_

> [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