Do not rely on ADL when invoking std::max_element (#9608)
Summary: Certain STLs use raw pointers and ADL does not work for them. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9608 Reviewed By: ajkr Differential Revision: D34583012 Pulled By: riversand963 fbshipit-source-id: 7de6bbc8a080c3e7243ce0d758fe83f1663168aa
This commit is contained in:
parent
13a03a5452
commit
da11a59034
@ -773,10 +773,11 @@ Status ExternalSstFileIngestionJob::AssignLevelAndSeqnoForIngestedFile(
|
|||||||
const std::vector<FileMetaData*>& level_files =
|
const std::vector<FileMetaData*>& level_files =
|
||||||
vstorage->LevelFiles(lvl);
|
vstorage->LevelFiles(lvl);
|
||||||
const SequenceNumber level_largest_seqno =
|
const SequenceNumber level_largest_seqno =
|
||||||
(*max_element(level_files.begin(), level_files.end(),
|
(*std::max_element(level_files.begin(), level_files.end(),
|
||||||
[](FileMetaData* f1, FileMetaData* f2) {
|
[](FileMetaData* f1, FileMetaData* f2) {
|
||||||
return f1->fd.largest_seqno < f2->fd.largest_seqno;
|
return f1->fd.largest_seqno <
|
||||||
}))
|
f2->fd.largest_seqno;
|
||||||
|
}))
|
||||||
->fd.largest_seqno;
|
->fd.largest_seqno;
|
||||||
// should only assign seqno to current level's largest seqno when
|
// should only assign seqno to current level's largest seqno when
|
||||||
// the file fits
|
// the file fits
|
||||||
|
Loading…
Reference in New Issue
Block a user