Tim Armstrong has posted comments on this change. ( http://gerrit.cloudera.org:8080/9123 )
Change subject: IMPALA-6437: separate AC/scheduler from catalog topic updates ...................................................................... Patch Set 11: (13 comments) Addressed most of the comments but had follow-on questions for two of them. http://gerrit.cloudera.org:8080/#/c/9123/6/be/src/statestore/statestore-subscriber.h File be/src/statestore/statestore-subscriber.h: http://gerrit.cloudera.org:8080/#/c/9123/6/be/src/statestore/statestore-subscriber.h@193 PS6, Line 193: > update_lock Done http://gerrit.cloudera.org:8080/#/c/9123/11/be/src/statestore/statestore.h File be/src/statestore/statestore.h: http://gerrit.cloudera.org:8080/#/c/9123/11/be/src/statestore/statestore.h@356 PS11, Line 356: GetSubscribedTopics > This name is confusing. Maybe GetPriorityClass() What about something like GetTopicsMapForId()? That seems to describe more exactly what it's doing. http://gerrit.cloudera.org:8080/#/c/9123/10/be/src/statestore/statestore.h File be/src/statestore/statestore.h: http://gerrit.cloudera.org:8080/#/c/9123/10/be/src/statestore/statestore.h@71 PS10, Line 71: the same update > GatherTopicUpdates() will be called again and it's not the same update Good point. reworded. http://gerrit.cloudera.org:8080/#/c/9123/10/be/src/statestore/statestore.h@260 PS10, Line 260: to > extra to Done http://gerrit.cloudera.org:8080/#/c/9123/10/be/src/statestore/statestore.cc File be/src/statestore/statestore.cc: http://gerrit.cloudera.org:8080/#/c/9123/10/be/src/statestore/statestore.cc@101 PS10, Line 101: const string STATESTORE_TOTAL_KEY_SIZE_BYTES = "statestore.total-key-size-bytes"; Long line. http://gerrit.cloudera.org:8080/#/c/9123/10/be/src/statestore/statestore.cc@161 PS10, Line 161: insert(make_pair > emplace Done http://gerrit.cloudera.org:8080/#/c/9123/10/be/src/statestore/statestore.cc@174 PS10, Line 174: insert(make_pair > emplace Done http://gerrit.cloudera.org:8080/#/c/9123/10/be/src/statestore/statestore.cc@285 PS10, Line 285: GetSubscribedTopics(topic.topic_name)->emplace(topic.topic_name, topic.is_transient) > The copy/move-constructable requirement can be avoided with I didn't realise that unordered_map could store non-movable elements. Thanks for the tip. http://gerrit.cloudera.org:8080/#/c/9123/10/be/src/statestore/statestore.cc@511 PS10, Line 511: scriber I > immediately Done http://gerrit.cloudera.org:8080/#/c/9123/11/be/src/statestore/statestore.cc File be/src/statestore/statestore.cc: http://gerrit.cloudera.org:8080/#/c/9123/11/be/src/statestore/statestore.cc@156 PS11, Line 156: const TTopicItem& item: entries > I think entry and item mean the same thing and should be unified. I switched "item" to "entry" where it made sense. I didn't rename the TTopicItem type. http://gerrit.cloudera.org:8080/#/c/9123/11/be/src/statestore/statestore.cc@174 PS11, Line 174: insert(make_pai > emplace Done http://gerrit.cloudera.org:8080/#/c/9123/11/be/src/statestore/statestore.cc@298 PS11, Line 298: == true > remove yeah that was weird. http://gerrit.cloudera.org:8080/#/c/9123/11/be/src/statestore/statestore.cc@651 PS11, Line 651: : vector<TopicEntry::Version> entry_versions = topic->Put(update.topic_entries); : if (!subscriber->AddTransientEntries( : update.topic_name, update.topic_entries, entry_versions)) { : // Subscriber was unregistered - clean up the transient entries. : for (int i = 0; i < update.topic_entries.size(); ++i) { : topic->DeleteIfVersionsMatch(entry_versions[i], update.topic_entries[i].key); : } : } > Why not just hold transient_entry_lock_ and check unregistered_, then put, I don't necessarily want to hold 'transient_entry_lock_' for the duration of Put(), because it mean mean that only one topic can be updated per subscriber in parallel. I didn't see an obvious way to avoid that without adding more fine-grained locks. Would it be better to encapsulate the put-then-revert pattern inside AddTransientEntries()? -- To view, visit http://gerrit.cloudera.org:8080/9123 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ifc49c2d0f2a5bfad822545616b8c62b4b95dc210 Gerrit-Change-Number: 9123 Gerrit-PatchSet: 11 Gerrit-Owner: Tim Armstrong <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Bikramjeet Vig <[email protected]> Gerrit-Reviewer: Dimitris Tsirogiannis <[email protected]> Gerrit-Reviewer: Tianyi Wang <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Comment-Date: Mon, 05 Feb 2018 19:42:47 +0000 Gerrit-HasComments: Yes
