Alex Behm has posted comments on this change. Change subject: IMPALA-4902: Copy parameters map in HdfsPartition.toThrift(). ......................................................................
Patch Set 1: (5 comments) http://gerrit.cloudera.org:8080/#/c/6127/1//COMMIT_MSG Commit Message: PS1, Line 11: As a result, one thread trying : to serialize a thrift table returned by toThrift() could : conflict with another thread updating the parameters maps of : the table partitions. > Any example of what these operations could be? Done http://gerrit.cloudera.org:8080/#/c/6127/1/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java File fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java: PS1, Line 1299: after with > rephrase? Done http://gerrit.cloudera.org:8080/#/c/6127/1/fe/src/main/java/org/apache/impala/catalog/HdfsPartition.java File fe/src/main/java/org/apache/impala/catalog/HdfsPartition.java: PS1, Line 765: XYZ > Update Oops, sorry. Done. http://gerrit.cloudera.org:8080/#/c/6127/1/fe/src/main/java/org/apache/impala/catalog/Table.java File fe/src/main/java/org/apache/impala/catalog/Table.java: Line 72: private final ReentrantLock tableLock_ = new ReentrantLock(); > How does removing fairness help here? This change is not necessary for this fix, I can remove it if you prefer. Fairness is not needed for this lock. Since a requirement for fairness is somewhat unusual, having it may mislead readers to think that fairness has a purpose here. PS1, Line 310: if (!tableLock_.isHeldByCurrentThread()) { : throw new IllegalStateException( : "Table.toThrift() called without holding the table lock: " + : getFullName() + " " + getClass().getName()); : } > Replace with Preconditions.checkState? That will cause the second string parameter to unnecessarily be evaluated for every toThrift() -- To view, visit http://gerrit.cloudera.org:8080/6127 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic11277ad5512d2431cd3cc791715917c95395ddf Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Alex Behm <alex.b...@cloudera.com> Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com> Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com> Gerrit-HasComments: Yes