Andrew Wong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/13858 )

Change subject: KUDU-2635: ignore failures to delete orphaned blocks
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/13858/4/src/kudu/tablet/tablet_metadata.cc
File src/kudu/tablet/tablet_metadata.cc:

http://gerrit.cloudera.org:8080/#/c/13858/4/src/kudu/tablet/tablet_metadata.cc@521
PS4, Line 521:     for (const BlockId& b : blocks) {
             :       orphaned_blocks_.erase(b);
             :     }
> Does this work instead?
I don't see why it doesn't, but it doesn't. I see in 
http://www.cplusplus.com/reference/unordered_set/unordered_set/erase/ it's 
supported. Maybe it's not a fan of the mismatched types. This works:

    BlockIdSet blocks_set;
    orphaned_blocks_.erase(blocks_set.begin(), blocks_set.end());

but as suggested, I see this error:


/opt/rh/devtoolset-3/root/usr/include/c++/4.9.2/bits/unordered_set.h:450:7: 
note:   candidate expects 1 argument, 2 provided
/opt/rh/devtoolset-3/root/usr/include/c++/4.9.2/bits/unordered_set.h:455:7: 
note: std::unordered_set<_Value, _Hash, _Pred, _Alloc>::iterator 
std::unordered_set<_Value, _Hash, _Pred, 
_Alloc>::erase(std::unordered_set<_Value, _Hash, _Pred, _Alloc>::iterator) 
[with _Value = kudu::BlockId; _Hash = kudu::BlockIdHash; _Pred = 
kudu::BlockIdEqual; _Alloc = std::allocator<kudu::BlockId>; 
std::unordered_set<_Value, _Hash, _Pred, _Alloc>::iterator = 
std::__detail::_Node_iterator<kudu::BlockId, true, true>]
       erase(iterator __it)
       ^



--
To view, visit http://gerrit.cloudera.org:8080/13858
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ice78f41d6d367d42ad31c2127ceb5fc57a244e34
Gerrit-Change-Number: 13858
Gerrit-PatchSet: 4
Gerrit-Owner: Andrew Wong <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: helifu <[email protected]>
Gerrit-Comment-Date: Tue, 16 Jul 2019 23:54:05 +0000
Gerrit-HasComments: Yes

Reply via email to