imay commented on a change in pull request #718: Clean timeout tablets channel
in TabletWriterMgr
URL: https://github.com/apache/incubator-doris/pull/718#discussion_r264085202
##########
File path: be/src/runtime/tablet_writer_mgr.h
##########
@@ -92,6 +96,15 @@ class TabletWriterMgr {
TabletsChannelKeyHasher> _tablets_channels;
Cache* _lastest_success_channel = nullptr;
+
+ std::unordered_map<TabletsChannelKey, time_t,TabletsChannelKeyHasher>
_key_time_map;
Review comment:
I think it's better to add a `last_updated_time` member in `TabletsChannel
`, then there is no need to maintain two map.
And when there is a new request referring to this tablets, then update this
field.
Then we can compare current wall time to this `last_updated_time` to see if
it has been exceeded the config timeout.
And I think this timeout can be some shorter time, such as 10 minutes
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]