Revision d82f1421b44dd84f77de8990d1422fa68f9021f0 authored by Siying Dong on 12 June 2018, 23:43:44 UTC, committed by Facebook Github Bot on 12 June 2018, 23:57:36 UTC
Summary: A recent change pushed down the upper bound checking to child iterators. However, this causes the logic of following sequence wrong: Seek(key); if (!Valid()) SeekToLast(); Because !Valid() may be caused by upper bounds, rather than the end of the iterator. In this case SeekToLast() points to totally wrong places. This can cause wrong results, infinite loops, or segfault in some cases. This sequence is called when changing direction from forward to backward. And this by itself also implicitly happen during reseeking optimization in Prev(). Fix this bug by using SeekForPrev() rather than this sequuence, as what is already done in prefix extrator case. Closes https://github.com/facebook/rocksdb/pull/3989 Differential Revision: D8385422 Pulled By: siying fbshipit-source-id: 429e869990cfd2dc389421e0836fc496bed67bb4
1 parent 9d34733
db_info_dumper.h
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
#pragma once
#include <string>
#include "options/db_options.h"
namespace rocksdb {
void DumpDBFileSummary(const ImmutableDBOptions& options,
const std::string& dbname);
} // namespace rocksdb
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...