impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sailesh Mukil (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4456: Change query exec state lock to a reader-writer lock
Date Sun, 13 Nov 2016 21:33:41 GMT
Sailesh Mukil has posted comments on this change.

Change subject: IMPALA-4456: Change query_exec_state_lock_ to a reader-writer lock

Patch Set 3:

> Once concern I have is about fairness. It's pretty critical that
 > writers don't get starved out of this lock because that prevents
 > queries from starting or finishing.
 > If there's enough demand for the reader-side of the lock such that
 > there's really no period at which the lock is free for writers, I
 > can see a starvation situation happening.
 > This doesn't happen right now because all once the lock is
 > released, there is always a period (however small) where the lock
 > is available for taking. You might need to think about an external
 > mechanism to prevent new readers from taking the lock when a writer
 > is waiting. That would make things more complicated, so let me know
 > if you have any better ideas.

Kudu has a RW lock that has a 'prefer writer' option.

This will however starve readers once there are a steady stream of writers. But I don't think
that should be a big issue because we will have writers only while registering or unregistering
a query. So the no. writers on this lock is 2x no. of queries on that coordinator, which is
much less than the number of readers.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I790a95e7179f07aa7ba188d5422c5e054353ba0b
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <>
Gerrit-Reviewer: Henry Robinson <>
Gerrit-Reviewer: Sailesh Mukil <>
Gerrit-HasComments: No

View raw message