Luo Chen has posted comments on this change.

Change subject: Implemented Disk Components Alignment Based on IDs
......................................................................


Patch Set 7:

(1 comment)

https://asterix-gerrit.ics.uci.edu/#/c/1761/6/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/CorrelatedPrefixMergePolicy.java
File 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/CorrelatedPrefixMergePolicy.java:

PS6, Line 103: isMergeLagging(
> >> However, this still wouldn't fully solve the problem for the following r
I was trying to implement this new solution today, which allows the merge 
operations be triggered by any index (but we only look at the primary index). 
However, after a few experiments, I found this solution is not doable because 
of deadlocks, and the detailed reason is as follows.

Still, suppose we have a primary index P and secondary index S on a dataset 
partition. Suppose in thread T1, S wants to send merge requests for S and P. 
Now T1 is holding S.baseOpTracker, and waiting for P.primaryOpTracker. However, 
suppose in thread T2, P.primaryOpTracker wants to flush the dataset. Now T2 
holds P.primaryOpTracker, and waits for S.baseOpTracker. Now we have a cycle 
here!

Thus, the conclusion is that in the current context, it's better to let the 
primary coordinate all merge requests for all indexes (this won't cause the 
deadlock problem since the primary index must already hold primaryOpTracker).


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1761
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I768ee9ac0a8d3c99c631086093a6b778b2e7588e
Gerrit-PatchSet: 7
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Luo Chen <[email protected]>
Gerrit-Reviewer: Ian Maxon <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Jianfeng Jia <[email protected]>
Gerrit-Reviewer: Luo Chen <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>
Gerrit-HasComments: Yes

Reply via email to