Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/13264 )
Change subject: KUDU-2807 Crash when flush or compaction overlaps with another compaction ...................................................................... Patch Set 2: (3 comments) http://gerrit.cloudera.org:8080/#/c/13264/2/src/kudu/tablet/tablet.cc File src/kudu/tablet/tablet.cc: http://gerrit.cloudera.org:8080/#/c/13264/2/src/kudu/tablet/tablet.cc@293 PS2, Line 293: if (metrics_) { Why not use the new helper function here? Seems like you could if you did it after components_ was set up. http://gerrit.cloudera.org:8080/#/c/13264/2/src/kudu/tablet/tablet.cc@1624 PS2, Line 1624: // Taking component_lock_ in write mode ensures that no new transactions : // can StartApplying() (or snapshot components_) during this block. : std::lock_guard<rw_spinlock> lock(component_lock_); Could we just call AtomicSwapRowSets here? Or do we need to hold component_lock_ for L1633-1634 too? http://gerrit.cloudera.org:8080/#/c/13264/2/src/kudu/tablet/tablet.cc@1729 PS2, Line 1729: UpdateAverageRowsetHeight(); Why not just always call this in AtomicSwapRowSetsUnlocked? You might need one exception: swapping in the duplicating rowset. But you can achieve that via parameterization. Seems easier than keeping the two decoupled (i.e. what if we added a new call to AtomicSwapRowSets in the future but forgot to also call UpdateAverageRowsetHeight there?). -- To view, visit http://gerrit.cloudera.org:8080/13264 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic255f0466aa2c158fa32e8e38428eddfcf901b99 Gerrit-Change-Number: 13264 Gerrit-PatchSet: 2 Gerrit-Owner: Will Berkeley <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Will Berkeley <[email protected]> Gerrit-Comment-Date: Wed, 08 May 2019 21:15:24 +0000 Gerrit-HasComments: Yes
