Skip to content

Commit

Permalink
Move auto_roll_logger and filename out of db/
Browse files Browse the repository at this point in the history
Summary:
It is confusing to have auto_roll_logger to stay under db/, which has nothing to do with database. Move filename together as it is a dependency.
Closes facebook#2080

Differential Revision: D4821141

Pulled By: siying

fbshipit-source-id: ca7d768
  • Loading branch information
siying authored and facebook-github-bot committed Apr 4, 2017
1 parent a1c469d commit 6ef8c62
Show file tree
Hide file tree
Showing 45 changed files with 70 additions and 74 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest)
# Main library source code

set(SOURCES
db/auto_roll_logger.cc
db/builder.cc
db/c.cc
db/column_family.cc
Expand All @@ -302,7 +301,6 @@ set(SOURCES
db/event_helpers.cc
db/external_sst_file_ingestion_job.cc
db/experimental.cc
db/filename.cc
db/file_indexer.cc
db/flush_job.cc
db/flush_scheduler.cc
Expand Down Expand Up @@ -387,6 +385,7 @@ set(SOURCES
util/event_logger.cc
util/file_util.cc
util/file_reader_writer.cc
util/filename.cc
util/sst_file_manager_impl.cc
util/filter_policy.cc
util/hash.cc
Expand All @@ -398,6 +397,7 @@ set(SOURCES
util/lru_cache.cc
tools/ldb_cmd.cc
tools/ldb_tool.cc
util/auto_roll_logger.cc
util/logging.cc
util/log_buffer.cc
util/memenv.cc
Expand Down Expand Up @@ -544,7 +544,6 @@ else()
endif()

set(TESTS
db/auto_roll_logger_test.cc
db/column_family_test.cc
db/compact_files_test.cc
db/compaction_iterator_test.cc
Expand Down Expand Up @@ -618,6 +617,7 @@ set(TESTS
tools/reduce_levels_test.cc
tools/sst_dump_test.cc
util/arena_test.cc
util/auto_roll_logger_test.cc
util/autovector_test.cc
util/bloom_test.cc
util/cache_test.cc
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ manual_compaction_test: db/manual_compaction_test.o $(LIBOBJECTS) $(TESTHARNESS)
filelock_test: util/filelock_test.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK)

auto_roll_logger_test: db/auto_roll_logger_test.o $(LIBOBJECTS) $(TESTHARNESS)
auto_roll_logger_test: util/auto_roll_logger_test.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK)

memtable_list_test: db/memtable_list_test.o $(LIBOBJECTS) $(TESTHARNESS)
Expand Down
2 changes: 1 addition & 1 deletion db/builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "db/compaction_iterator.h"
#include "db/dbformat.h"
#include "db/event_helpers.h"
#include "db/filename.h"
#include "db/internal_stats.h"
#include "db/merge_helper.h"
#include "db/table_cache.h"
Expand All @@ -29,6 +28,7 @@
#include "table/block_based_table_builder.h"
#include "table/internal_iterator.h"
#include "util/file_reader_writer.h"
#include "util/filename.h"
#include "util/iostats_context_imp.h"
#include "util/stop_watch.h"
#include "util/thread_status_util.h"
Expand Down
4 changes: 2 additions & 2 deletions db/compaction_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "db/db_iter.h"
#include "db/dbformat.h"
#include "db/event_helpers.h"
#include "db/filename.h"
#include "db/log_reader.h"
#include "db/log_writer.h"
#include "db/memtable.h"
Expand All @@ -49,12 +48,13 @@
#include "table/table_builder.h"
#include "util/coding.h"
#include "util/file_reader_writer.h"
#include "util/filename.h"
#include "util/iostats_context_imp.h"
#include "util/log_buffer.h"
#include "util/logging.h"
#include "util/sst_file_manager_impl.h"
#include "util/mutexlock.h"
#include "util/perf_context_imp.h"
#include "util/sst_file_manager_impl.h"
#include "util/stop_watch.h"
#include "util/string_util.h"
#include "util/sync_point.h"
Expand Down
2 changes: 1 addition & 1 deletion db/compaction_job_stats_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

#include "db/db_impl.h"
#include "db/dbformat.h"
#include "db/filename.h"
#include "db/job_context.h"
#include "db/version_set.h"
#include "db/write_batch_internal.h"
Expand All @@ -50,6 +49,7 @@
#include "table/plain_table_factory.h"
#include "table/scoped_arena_iterator.h"
#include "util/compression.h"
#include "util/filename.h"
#include "util/hash.h"
#include "util/logging.h"
#include "util/mock_env.h"
Expand Down
2 changes: 1 addition & 1 deletion db/compaction_picker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <string>
#include <utility>
#include "db/column_family.h"
#include "db/filename.h"
#include "util/filename.h"
#include "util/log_buffer.h"
#include "util/random.h"
#include "util/statistics.h"
Expand Down
10 changes: 5 additions & 5 deletions db/corruption_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@

#include "rocksdb/db.h"

#include <inttypes.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "db/db_impl.h"
#include "db/log_format.h"
#include "db/version_set.h"
#include "rocksdb/cache.h"
#include "rocksdb/env.h"
#include "rocksdb/table.h"
#include "rocksdb/write_batch.h"
#include "db/db_impl.h"
#include "db/filename.h"
#include "db/log_format.h"
#include "db/version_set.h"
#include "util/filename.h"
#include "util/logging.h"
#include "util/testharness.h"
#include "util/testutil.h"
Expand Down
2 changes: 1 addition & 1 deletion db/db_filesnapshot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
#include <algorithm>
#include <string>
#include "db/db_impl.h"
#include "db/filename.h"
#include "db/job_context.h"
#include "db/version_set.h"
#include "port/port.h"
#include "rocksdb/db.h"
#include "rocksdb/env.h"
#include "util/file_util.h"
#include "util/filename.h"
#include "util/mutexlock.h"
#include "util/sync_point.h"

Expand Down
4 changes: 2 additions & 2 deletions db/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@
#include <utility>
#include <vector>

#include "db/auto_roll_logger.h"
#include "db/builder.h"
#include "db/compaction_job.h"
#include "db/db_info_dumper.h"
#include "db/db_iter.h"
#include "db/dbformat.h"
#include "db/event_helpers.h"
#include "db/external_sst_file_ingestion_job.h"
#include "db/filename.h"
#include "db/flush_job.h"
#include "db/forward_iterator.h"
#include "db/job_context.h"
Expand Down Expand Up @@ -78,6 +76,7 @@
#include "table/merging_iterator.h"
#include "table/table_builder.h"
#include "table/two_level_iterator.h"
#include "util/auto_roll_logger.h"
#include "util/autovector.h"
#include "util/build_version.h"
#include "util/cf_options.h"
Expand All @@ -86,6 +85,7 @@
#include "util/crc32c.h"
#include "util/file_reader_writer.h"
#include "util/file_util.h"
#include "util/filename.h"
#include "util/iostats_context_imp.h"
#include "util/log_buffer.h"
#include "util/logging.h"
Expand Down
2 changes: 1 addition & 1 deletion db/db_info_dumper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include <algorithm>
#include <vector>

#include "db/filename.h"
#include "rocksdb/env.h"
#include "util/filename.h"

namespace rocksdb {

Expand Down
2 changes: 1 addition & 1 deletion db/db_iter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <limits>

#include "db/dbformat.h"
#include "db/filename.h"
#include "db/merge_context.h"
#include "db/merge_helper.h"
#include "db/pinned_iterators_manager.h"
Expand All @@ -25,6 +24,7 @@
#include "rocksdb/options.h"
#include "table/internal_iterator.h"
#include "util/arena.h"
#include "util/filename.h"
#include "util/logging.h"
#include "util/mutexlock.h"
#include "util/perf_context_imp.h"
Expand Down
2 changes: 1 addition & 1 deletion db/db_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "db/db_impl.h"
#include "db/db_test_util.h"
#include "db/dbformat.h"
#include "db/filename.h"
#include "db/job_context.h"
#include "db/version_set.h"
#include "db/write_batch_internal.h"
Expand Down Expand Up @@ -57,6 +56,7 @@
#include "table/scoped_arena_iterator.h"
#include "util/compression.h"
#include "util/file_reader_writer.h"
#include "util/filename.h"
#include "util/hash.h"
#include "util/logging.h"
#include "util/mock_env.h"
Expand Down
2 changes: 1 addition & 1 deletion db/db_test_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

#include "db/db_impl.h"
#include "db/dbformat.h"
#include "db/filename.h"
#include "memtable/hash_linklist_rep.h"
#include "rocksdb/cache.h"
#include "rocksdb/compaction_filter.h"
Expand All @@ -45,6 +44,7 @@
#include "table/plain_table_factory.h"
#include "table/scoped_arena_iterator.h"
#include "util/compression.h"
#include "util/filename.h"
#include "util/mock_env.h"
#include "util/mutexlock.h"

Expand Down
2 changes: 1 addition & 1 deletion db/deletefile_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
#include <string>
#include <vector>
#include "db/db_impl.h"
#include "db/filename.h"
#include "db/version_set.h"
#include "db/write_batch_internal.h"
#include "rocksdb/db.h"
#include "rocksdb/env.h"
#include "rocksdb/transaction_log.h"
#include "util/filename.h"
#include "util/string_util.h"
#include "util/sync_point.h"
#include "util/testharness.h"
Expand Down
2 changes: 1 addition & 1 deletion db/fault_injection_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// file data (or entire files) not protected by a "sync".

#include "db/db_impl.h"
#include "db/filename.h"
#include "db/log_format.h"
#include "db/version_set.h"
#include "rocksdb/cache.h"
Expand All @@ -21,6 +20,7 @@
#include "rocksdb/table.h"
#include "rocksdb/write_batch.h"
#include "util/fault_injection_test_env.h"
#include "util/filename.h"
#include "util/logging.h"
#include "util/mock_env.h"
#include "util/mutexlock.h"
Expand Down
2 changes: 1 addition & 1 deletion db/filename_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// 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/filename.h"
#include "util/filename.h"

#include "db/dbformat.h"
#include "port/port.h"
Expand Down
2 changes: 1 addition & 1 deletion db/flush_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "db/db_iter.h"
#include "db/dbformat.h"
#include "db/event_helpers.h"
#include "db/filename.h"
#include "db/log_reader.h"
#include "db/log_writer.h"
#include "db/memtable.h"
Expand All @@ -44,6 +43,7 @@
#include "util/coding.h"
#include "util/event_logger.h"
#include "util/file_util.h"
#include "util/filename.h"
#include "util/iostats_context_imp.h"
#include "util/log_buffer.h"
#include "util/logging.h"
Expand Down
2 changes: 1 addition & 1 deletion db/listener_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "db/db_impl.h"
#include "db/db_test_util.h"
#include "db/dbformat.h"
#include "db/filename.h"
#include "db/version_set.h"
#include "db/write_batch_internal.h"
#include "memtable/hash_linklist_rep.h"
Expand All @@ -23,6 +22,7 @@
#include "rocksdb/table_properties.h"
#include "table/block_based_table_factory.h"
#include "table/plain_table_factory.h"
#include "util/filename.h"
#include "util/hash.h"
#include "util/logging.h"
#include "util/mutexlock.h"
Expand Down
2 changes: 1 addition & 1 deletion db/memtable_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <deque>

#include "db/dbformat.h"
#include "db/filename.h"
#include "db/memtable.h"
#include "db/range_del_aggregator.h"
#include "db/skiplist.h"
Expand All @@ -21,6 +20,7 @@
#include "rocksdb/options.h"
#include "rocksdb/types.h"
#include "util/autovector.h"
#include "util/filename.h"
#include "util/instrumented_mutex.h"
#include "util/log_buffer.h"

Expand Down
6 changes: 3 additions & 3 deletions db/plain_table_db_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <set>

#include "db/db_impl.h"
#include "db/filename.h"
#include "db/version_set.h"
#include "db/write_batch_internal.h"
#include "rocksdb/cache.h"
Expand All @@ -25,12 +24,13 @@
#include "rocksdb/filter_policy.h"
#include "rocksdb/slice_transform.h"
#include "rocksdb/table.h"
#include "table/meta_blocks.h"
#include "table/bloom_block.h"
#include "table/table_builder.h"
#include "table/meta_blocks.h"
#include "table/plain_table_factory.h"
#include "table/plain_table_key_coding.h"
#include "table/plain_table_reader.h"
#include "table/table_builder.h"
#include "util/filename.h"
#include "util/hash.h"
#include "util/logging.h"
#include "util/mutexlock.h"
Expand Down
2 changes: 1 addition & 1 deletion db/repair.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
#include "db/builder.h"
#include "db/db_impl.h"
#include "db/dbformat.h"
#include "db/filename.h"
#include "db/log_reader.h"
#include "db/log_writer.h"
#include "db/memtable.h"
Expand All @@ -83,6 +82,7 @@
#include "table/scoped_arena_iterator.h"
#include "util/cf_options.h"
#include "util/file_reader_writer.h"
#include "util/filename.h"
#include "util/string_util.h"

namespace rocksdb {
Expand Down
2 changes: 1 addition & 1 deletion db/table_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "db/table_cache.h"

#include "db/dbformat.h"
#include "db/filename.h"
#include "db/version_edit.h"
#include "util/filename.h"

#include "rocksdb/statistics.h"
#include "table/internal_iterator.h"
Expand Down
Loading

0 comments on commit 6ef8c62

Please sign in to comment.