Skip to content

Commit

Permalink
Fix sync-point comment in Block destructor (facebook#4380)
Browse files Browse the repository at this point in the history
Summary:
This is a follow up to facebook#4370. The earlier comment is not correct.

Thanks to ajkr for pointing this out.
Pull Request resolved: facebook#4380

Differential Revision: D9874667

Pulled By: sagar0

fbshipit-source-id: f4e092d86b29c715258210b770643d367e38caae
  • Loading branch information
sagar0 authored and cngzhnp committed Sep 17, 2018
1 parent dfda910 commit 3a23c41
Show file tree
Hide file tree
Showing 397 changed files with 1,342 additions and 2,567 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,6 @@ dbg: $(LIBRARY) $(BENCHMARKS) tools $(TESTS)

# creates static library and programs
release:
$(MAKE) clean
DEBUG_LEVEL=0 $(MAKE) static_lib tools db_bench

coverage:
Expand Down
12 changes: 7 additions & 5 deletions cache/cache_bench.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
#ifndef GFLAGS

#include <cstdio>

#ifndef GFLAGS

int main() {
fprintf(stderr, "Please install gflags to run rocksdb tools\n");
return 1;
}
#else

#include <inttypes.h>
#include <sys/types.h>
#include <stdio.h>

#include "port/port.h"
#include "rocksdb/cache.h"
#include "rocksdb/db.h"
Expand All @@ -26,6 +25,9 @@ int main() {
#include "util/mutexlock.h"
#include "util/random.h"

#include <inttypes.h>
#include <sys/types.h>

using GFLAGS_NAMESPACE::ParseCommandLineFlags;

static const uint32_t KB = 1024;
Expand Down
6 changes: 0 additions & 6 deletions cache/cache_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#include "rocksdb/cache.h"

#include <forward_list>
#include <functional>
#include <iostream>
#include <string>
#include <vector>
#include "cache/clock_cache.h"
#include "cache/lru_cache.h"
#include "util/coding.h"
Expand Down
3 changes: 2 additions & 1 deletion cache/clock_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#include "cache/clock_cache.h"
#include "rocksdb/cache.h"

#ifndef SUPPORT_CLOCK_CACHE

Expand All @@ -23,7 +24,7 @@ std::shared_ptr<Cache> NewClockCache(size_t /*capacity*/, int /*num_shard_bits*/

#else

#include <assert.h>
#include <cassert>
#include <atomic>
#include <deque>

Expand Down
2 changes: 0 additions & 2 deletions cache/clock_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

#pragma once

#include "rocksdb/cache.h"

#if defined(TBB) && !defined(ROCKSDB_LITE)
#define SUPPORT_CLOCK_CACHE
#endif
8 changes: 2 additions & 6 deletions cache/lru_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,10 @@
#endif

#include "cache/lru_cache.h"

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>

#include "util/mutexlock.h"

#include <cassert>

namespace rocksdb {

LRUHandleTable::LRUHandleTable() : list_(nullptr), length_(0), elems_(0) {
Expand Down
4 changes: 0 additions & 4 deletions cache/lru_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#pragma once

#include <string>

#include "cache/sharded_cache.h"

#include "port/port.h"
#include "util/autovector.h"

namespace rocksdb {
Expand Down
3 changes: 0 additions & 3 deletions cache/sharded_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
#endif

#include "cache/sharded_cache.h"

#include <string>

#include "util/mutexlock.h"

namespace rocksdb {
Expand Down
5 changes: 2 additions & 3 deletions cache/sharded_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@

#pragma once

#include <atomic>
#include <string>

#include "port/port.h"
#include "rocksdb/cache.h"
#include "util/hash.h"

#include <atomic>

namespace rocksdb {

// Single cache shard interface.
Expand Down
26 changes: 4 additions & 22 deletions db/builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#include "db/builder.h"

#include <algorithm>
#include <deque>
#include <vector>

#include "db/internal_stats.h"
#include "db/compaction_iterator.h"
#include "db/dbformat.h"
#include "db/event_helpers.h"
#include "db/internal_stats.h"
#include "db/merge_helper.h"
#include "db/range_del_aggregator.h"
#include "db/table_cache.h"
#include "db/version_edit.h"
#include "monitoring/iostats_context_imp.h"
#include "monitoring/thread_status_util.h"
#include "rocksdb/db.h"
#include "rocksdb/env.h"
#include "rocksdb/iterator.h"
#include "rocksdb/options.h"
#include "rocksdb/table.h"
#include "table/block_based_table_builder.h"
#include "table/format.h"
#include "table/internal_iterator.h"
#include "util/file_reader_writer.h"
#include "table/table_builder.h"
#include "util/filename.h"
#include "util/stop_watch.h"
#include "util/sync_point.h"
#include "util/file_reader_writer.h"

namespace rocksdb {

class TableFactory;

TableBuilder* NewTableBuilder(
const ImmutableCFOptions& ioptions, const MutableCFOptions& moptions,
const InternalKeyComparator& internal_comparator,
Expand Down
32 changes: 15 additions & 17 deletions db/builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,33 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#pragma once
#include <string>
#include <utility>
#include <vector>
#include "db/table_properties_collector.h"
#include "options/cf_options.h"
#include "rocksdb/comparator.h"

#include "rocksdb/env.h"
#include "rocksdb/listener.h"
#include "rocksdb/options.h"
#include "rocksdb/status.h"
#include "rocksdb/table_properties.h"
#include "rocksdb/types.h"
#include "table/scoped_arena_iterator.h"
#include "util/event_logger.h"
#include "table/merging_iterator.h"

namespace rocksdb {

struct Options;
enum CompressionType : unsigned char;

struct CompressionOptions;
struct FileMetaData;
struct ImmutableCFOptions;
struct MutableCFOptions;
struct Options;
struct TableProperties;

class Env;
struct EnvOptions;
class EventLogger;
class InternalKeyComparator;
class InternalStats;
class IntTblPropCollectorFactory;
class Iterator;
class SnapshotChecker;
class TableBuilder;
class TableCache;
class VersionEdit;
class TableBuilder;
class WritableFileWriter;
class InternalStats;


// @param column_family_name Name of the column family that is also identified
// by column_family_id, or empty string if unknown. It must outlive the
Expand Down
11 changes: 1 addition & 10 deletions db/c.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,25 @@

#include "rocksdb/c.h"

#include <stdlib.h>
#include "port/port.h"
#include "rocksdb/cache.h"
#include "rocksdb/compaction_filter.h"
#include "rocksdb/comparator.h"
#include "rocksdb/convenience.h"
#include "rocksdb/db.h"
#include "rocksdb/env.h"
#include "rocksdb/filter_policy.h"
#include "rocksdb/iterator.h"
#include "rocksdb/memtablerep.h"
#include "rocksdb/merge_operator.h"
#include "rocksdb/options.h"
#include "rocksdb/perf_level.h"
#include "rocksdb/rate_limiter.h"
#include "rocksdb/slice_transform.h"
#include "rocksdb/statistics.h"
#include "rocksdb/status.h"
#include "rocksdb/table.h"
#include "rocksdb/universal_compaction.h"
#include "rocksdb/utilities/backupable_db.h"
#include "rocksdb/utilities/checkpoint.h"
#include "rocksdb/utilities/db_ttl.h"
#include "rocksdb/utilities/memory_util.h"
#include "rocksdb/utilities/optimistic_transaction_db.h"
#include "rocksdb/utilities/transaction.h"
#include "rocksdb/utilities/transaction_db.h"
#include "rocksdb/utilities/write_batch_with_index.h"
#include "rocksdb/write_batch.h"
#include "rocksdb/perf_context.h"
#include "utilities/merge_operators.h"

Expand Down
24 changes: 7 additions & 17 deletions db/column_family.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,25 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#include "db/column_family.h"

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include <vector>
#include <string>
#include <algorithm>
#include <limits>

#include "db/compaction_picker.h"
#include "db/column_family.h"
#include "db/compaction_picker_universal.h"
#include "db/db_impl.h"
#include "db/internal_stats.h"
#include "db/job_context.h"
#include "db/range_del_aggregator.h"
#include "db/table_cache.h"
#include "db/table_properties_collector.h"
#include "db/version_set.h"
#include "db/write_controller.h"
#include "memtable/hash_skiplist_rep.h"
#include "monitoring/thread_status_util.h"
#include "options/options_helper.h"
#include "table/block_based_table_factory.h"
#include "table/scoped_arena_iterator.h"
#include "table/merging_iterator.h"
#include "util/autovector.h"
#include "util/compression.h"
#include "util/logging.h"
#include "util/sst_file_manager_impl.h"

#include <inttypes.h>

namespace rocksdb {

ColumnFamilyHandleImpl::ColumnFamilyHandleImpl(
Expand Down
20 changes: 8 additions & 12 deletions db/column_family.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,10 @@

#pragma once

#include <unordered_map>
#include <string>
#include <vector>
#include <atomic>

#include "db/memtable_list.h"
#include "db/table_cache.h"
#include "db/table_properties_collector.h"
#include "db/write_batch_internal.h"
#include "db/write_controller.h"
#include "options/cf_options.h"
#include "rocksdb/compaction_job_stats.h"
#include "rocksdb/db.h"
#include "rocksdb/env.h"
#include "rocksdb/options.h"
#include "util/thread_local.h"

namespace rocksdb {

Expand All @@ -42,6 +30,14 @@ class DBImpl;
class LogBuffer;
class InstrumentedMutex;
class InstrumentedMutexLock;
class TableCache;
class IntTblPropCollectorFactory;
class WriteController;
class WriteControllerToken;

enum class FlushReason : int;
enum class WriteStallCondition : int;

struct SuperVersionContext;

extern const double kIncSlowdownRatio;
Expand Down
5 changes: 3 additions & 2 deletions db/compacted_db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
// (found in the LICENSE.Apache file in the root directory).

#ifndef ROCKSDB_LITE

#include "db/compacted_db_impl.h"
#include "db/db_impl.h"
#include "db/version_set.h"
#include "table/get_context.h"
#include "table/table_reader.h"
#include "util/logging.h"

namespace rocksdb {

Expand Down
3 changes: 1 addition & 2 deletions db/compacted_db_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@

#pragma once
#ifndef ROCKSDB_LITE

#include "db/db_impl.h"
#include <vector>
#include <string>

namespace rocksdb {

Expand Down
9 changes: 5 additions & 4 deletions db/compaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include <vector>

#include "db/column_family.h"
#include "db/compaction_picker.h"
#include "db/version_set.h"
#include "rocksdb/compaction_filter.h"
#include "table/table_reader.h"
#include "util/string_util.h"
#include "util/sync_point.h"

#include <inttypes.h>

namespace rocksdb {

uint64_t TotalFileSize(const std::vector<FileMetaData*>& files) {
Expand Down
Loading

0 comments on commit 3a23c41

Please sign in to comment.