Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/8254 )
Change subject: catalog manager: fix DDL race ...................................................................... Patch Set 3: (3 comments) http://gerrit.cloudera.org:8080/#/c/8254/2/src/kudu/master/catalog_manager.cc File src/kudu/master/catalog_manager.cc: http://gerrit.cloudera.org:8080/#/c/8254/2/src/kudu/master/catalog_manager.cc@1519 PS2, Line 1519: // a concurrent rename table, try again to find the table. : TableMetadataLock lock(table_info->get(), lock_mode); > Done Your comment explains that we do retry, but it doesn't address my question: why is it important to retry instead of just failing? http://gerrit.cloudera.org:8080/#/c/8254/2/src/kudu/master/catalog_manager.cc@1522 PS2, Line 1522: > My understanding is that it's sufficient to check the table metadata since Hmm, that's true if lock_mode==WRITE (since writers are mutually exclusive in the RWC lock), but if lock_mode==READ, we can acquire the table lock concurrently with an alter. Am I missing something, or does that then leave this race open if/when FindAndLockTable is called with lock_mode==READ? http://gerrit.cloudera.org:8080/#/c/8254/3/src/kudu/master/catalog_manager.cc File src/kudu/master/catalog_manager.cc: http://gerrit.cloudera.org:8080/#/c/8254/3/src/kudu/master/catalog_manager.cc@1503 PS3, Line 1503: if (table_identifier.has_table_name()) { Why the reversal here? Isn't lookup by ID preferable to by name? -- To view, visit http://gerrit.cloudera.org:8080/8254 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I84ca3b207da28cd7dc43a077736da9b4e0ec6f37 Gerrit-Change-Number: 8254 Gerrit-PatchSet: 3 Gerrit-Owner: Dan Burkert <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Comment-Date: Wed, 11 Oct 2017 21:16:03 +0000 Gerrit-HasComments: Yes
