yiguolei commented on code in PR #30933:
URL: https://github.com/apache/doris/pull/30933#discussion_r1480870666
##########
be/src/vec/sink/delta_writer_v2_pool.cpp:
##########
@@ -32,10 +32,15 @@ DeltaWriterV2Map::~DeltaWriterV2Map() = default;
DeltaWriterV2* DeltaWriterV2Map::get_or_create(
int64_t tablet_id, std::function<std::unique_ptr<DeltaWriterV2>()>
creator) {
- _map.lazy_emplace(tablet_id, [&](const
TabletToDeltaWriterV2Map::constructor& ctor) {
- ctor(tablet_id, creator());
- });
- return _map.at(tablet_id).get();
+ DeltaWriterV2* delta_writer = nullptr;
Review Comment:
do not use so complicated code and the code is depend on phmap, it is not
very stable.
Just use a lock and check if the key exeist and create it.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]