impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-5238: transfer reservations between trackers
Date Thu, 11 May 2017 15:35:41 GMT
Tim Armstrong has posted comments on this change.

Change subject: IMPALA-5238: transfer reservations between trackers
......................................................................


Patch Set 6:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/6708/6/be/src/runtime/bufferpool/reservation-tracker.h
File be/src/runtime/bufferpool/reservation-tracker.h:

PS6, Line 232: subtrees
> I don't understand that, given that locks need to be acquired from bottom t
Right, before the lock order was only a partial order - if neither tracker is an ancestor
of the other you don't know which should be acquired first. E.g. below C precedes B and E
precedes D, and B and D precede A, but you can't acquire all the locks because it's not determined
whether you acquire locks on the B branch first or the D branch first.

      A
     / \
    B   D
   /     \
  C       E

My proposal was to define an order on the children of A, e.g. to define that B precedes D.
Then the total order is

C->B->E->D->A

If you have more complicated trees (not just two paths) you can apply the rule recursively.
Assuming F precedes E, we get C->B->G->F->E->D->A

      A
     / \
    B   D
   /    /\
  C    F  E
      /
     G


-- 
To view, visit http://gerrit.cloudera.org:8080/6708
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I21f008abaf1aa4fcd2d854769a603b97589af3b3
Gerrit-PatchSet: 6
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message