Skip to content

Commit

Permalink
Refactor file storage, part12 (#1976)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

_Briefly describe what this PR aims to solve. Include background context
that will help reviewers understand the purpose of the PR._

### Type of change

- [x] Refactoring

---------

Signed-off-by: Jin Hai <[email protected]>
  • Loading branch information
JinHai-CN authored Oct 6, 2024
1 parent 19c5aa6 commit 2bc87d9
Show file tree
Hide file tree
Showing 47 changed files with 131 additions and 1,040 deletions.
1 change: 0 additions & 1 deletion benchmark/local_infinity/knn/hnsw_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import status;
import hnsw_common;
import infinity_exception;
import profiler;
import abstract_file_handle;

using namespace infinity;

Expand Down
3 changes: 2 additions & 1 deletion benchmark/local_infinity/knn/hnsw_benchmark_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
#include "CLI11.hpp"

import stl;
import file_system;
import virtual_store;
import local_file_handle;
import infinity_exception;
import abstract_file_handle;

using namespace infinity;

Expand Down
1 change: 0 additions & 1 deletion benchmark/local_infinity/sparse/sparse_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import third_party;
import profiler;
import linscan_alg;
import sparse_util;
import abstract_file_handle;

using namespace infinity;
using namespace benchmark;
Expand Down
1 change: 0 additions & 1 deletion benchmark/local_infinity/sparse/sparse_benchmark_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import infinity_exception;
import sparse_util;
import compilation_config;
import bmp_util;
import abstract_file_handle;

using namespace infinity;

Expand Down
1 change: 0 additions & 1 deletion src/executor/operator/physical_export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import default_values;
import internal_types;
import virtual_store;
import local_file_handle;
import abstract_file_handle;

namespace infinity {

Expand Down
2 changes: 1 addition & 1 deletion src/executor/operator/physical_import.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import build_fast_rough_filter_task;
import stream_reader;
import parser_assert;
import virtual_store;
import abstract_file_handle;
import local_file_handle;

namespace infinity {

Expand Down
1 change: 0 additions & 1 deletion src/main/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import status;
import options;
import command_statement;
import infinity_exception;
import virtual_storage_type;

namespace infinity {

Expand Down
13 changes: 6 additions & 7 deletions src/main/config.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import third_party;
import options;
import status;
import command_statement;
import virtual_storage_type;
import virtual_store;

namespace infinity {

Expand All @@ -41,7 +41,7 @@ export struct DefaultConfig {

export struct Config {
public:
Status Init(const SharedPtr<String> &config_path, DefaultConfig* default_config);
Status Init(const SharedPtr<String> &config_path, DefaultConfig *default_config);

void PrintAll();

Expand All @@ -53,9 +53,7 @@ public:

void SetCPULimit(i64 new_cpu_limit);
i64 CPULimit();
inline bool RecordRunningQuery() {
return record_running_query_;
}
inline bool RecordRunningQuery() { return record_running_query_; }
void SetRecordRunningQuery(bool flag);

// Network
Expand Down Expand Up @@ -131,9 +129,10 @@ public:

public:
// Get config by name
Tuple<BaseOption *, Status> GetConfigByName(const String& name);
Tuple<BaseOption *, Status> GetConfigByName(const String &name);

GlobalOptionIndex GetOptionIndex(const String &var_name) const { return global_options_.GetOptionIndex(var_name); }

GlobalOptionIndex GetOptionIndex(const String& var_name) const { return global_options_.GetOptionIndex(var_name); }
private:
static void ParseTimeZoneStr(const String &time_zone_str, String &parsed_time_zone, i32 &parsed_time_zone_bias);

Expand Down
2 changes: 1 addition & 1 deletion src/storage/buffer/file_worker/bmp_index_file_worker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import bmp_alg;
import abstract_bmp;
import virtual_store;
import persistence_manager;
import abstract_file_handle;
import local_file_handle;

namespace infinity {

Expand Down
1 change: 0 additions & 1 deletion src/storage/buffer/file_worker/file_worker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import persistence_manager;
import infinity_context;
import logger;
import persist_result_handler;
import abstract_file_handle;

namespace infinity {

Expand Down
2 changes: 1 addition & 1 deletion src/storage/buffer/file_worker/hnsw_file_worker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import internal_types;
import abstract_hnsw;
import virtual_store;
import persistence_manager;
import abstract_file_handle;
import local_file_handle;

namespace infinity {

Expand Down
1 change: 0 additions & 1 deletion src/storage/invertedindex/column_index_merger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import posting_byte_slice_reader;
import posting_merger;
import third_party;
import virtual_store;
import abstract_file_handle;
import local_file_handle;
import infinity_exception;
import vector_with_lock;
Expand Down
2 changes: 1 addition & 1 deletion src/storage/invertedindex/memory_indexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import persistence_manager;
import utility;
import persist_result_handler;
import virtual_store;
import abstract_file_handle;
import local_file_handle;

namespace infinity {
constexpr int MAX_TUPLE_LENGTH = 1024; // we assume that analyzed term, together with docid/offset info, will never exceed such length
Expand Down
29 changes: 0 additions & 29 deletions src/storage/io/abstract_file_handle.cpp

This file was deleted.

56 changes: 0 additions & 56 deletions src/storage/io/abstract_file_handle.cppm

This file was deleted.

Loading

0 comments on commit 2bc87d9

Please sign in to comment.