Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add file error handling and structure handlers factory method #260

Merged
merged 29 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
de4483c
Add file `Flush` and `Close` error handling
Dec 14, 2022
80f11c6
Add pool method (WIP)
Dec 14, 2022
9e016b4
Add file error handling
Dec 15, 2022
cf395c2
Add reference wrapper
Dec 19, 2022
a53b83a
Add file factory method
Jan 10, 2023
7be75fa
Merge branch 'master' into mike/file_error_handling
Jan 12, 2023
7bfd0d2
Fix file index tests (WIP)
Jan 12, 2023
2908c73
Fix file index tests
Jan 13, 2023
b68a71a
Fix index tests and benchmark
Jan 13, 2023
02cf802
Add error handling for store tests and benchmarks
Jan 14, 2023
b85319b
Add error handling for file benchmark wrapper
Jan 14, 2023
3edc1a0
Update leveldb error handling
Jan 14, 2023
6589d63
Fix common library comments
Jan 14, 2023
38b337e
Update depot test and benchmark error handling
Jan 14, 2023
5dbb274
Merge branch 'master' into mike/file_error_handling
Jan 14, 2023
e828a3d
Rollback go mod
Jan 15, 2023
d582df8
Update state error handling
Jan 15, 2023
229a869
Update state error handling
Jan 15, 2023
fcefafc
Make `ReferenceWrapper` non-internal.
Jan 16, 2023
f586d06
Add status with system error function tests
Jan 16, 2023
3766195
Fix macosx build
Jan 16, 2023
a0a64ae
Fix macosx build
Jan 16, 2023
6d3ae30
Fix macosx build
Jan 16, 2023
d63c579
Fix macosx build
Jan 17, 2023
6554309
Merge branch 'master' into mike/file_error_handling
Jan 18, 2023
d9b4cf3
Fix page manager `NewPage` method
Jan 18, 2023
5e84a85
Refactor file error handling
Jan 22, 2023
2ac5709
Add fstream wrapper integration into file index
Jan 23, 2023
2a4b352
Refactor fstream wrapper
Jan 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions cpp/backend/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ cc_library(
deps = [
":page_id",
":page",
"//common:status_util",
"@com_google_absl//absl/status:status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings:str_format",
],
visibility = ["//backend:__subpackages__"],
)
Expand All @@ -45,6 +49,7 @@ cc_test(
deps = [
":file",
"//common:file_util",
"//common:status_test_util",
"@com_google_googletest//:gtest_main",
],
)
Expand All @@ -55,7 +60,9 @@ cc_binary(
deps = [
":file",
"//common:file_util",
"//common:status_test_util",
"@com_github_google_benchmark//:benchmark_main",
"@com_google_absl//absl/status:statusor",
"//third_party/gperftools:profiler",
],
testonly = True,
Expand Down Expand Up @@ -99,6 +106,9 @@ cc_library(
":file",
":page_id",
"//common:memory_usage",
"//common:status_util",
"@com_google_absl//absl/status:status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/container:flat_hash_map",
],
visibility = ["//backend:__subpackages__"],
Expand All @@ -110,6 +120,7 @@ cc_test(
deps = [
":page",
":page_pool",
"//common:status_test_util",
"@com_google_googletest//:gtest_main",
],
)
Expand All @@ -121,7 +132,11 @@ cc_binary(
":access_pattern",
":eviction_policy",
":page_pool",
"//common:status_test_util",
"@com_github_google_benchmark//:benchmark_main",
"@com_google_absl//absl/status:status",
"@com_google_absl//absl/status:statusor",
"//third_party/gperftools:profiler",
],
testonly = True,
)
2 changes: 1 addition & 1 deletion cpp/backend/common/access_pattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Sequential {
std::size_t next_;
};

// Simulates an uniformely distributed access pattern to a range of
// Simulates an uniformly distributed access pattern to a range of
// [0,...,size).
class Uniform {
public:
Expand Down
4 changes: 2 additions & 2 deletions cpp/backend/common/eviction_policy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace carmen::backend {

namespace {

// Selects a alement for the given set to be evicted according to the provided
// Selects an element for the given set to be evicted according to the provided
// eviction pattern. The EvictionPattern needs to provide a Next() function
// providing a random slot to be evicted. The next higher value present in the
// set is then chosen to be evicted.
Expand Down Expand Up @@ -106,7 +106,7 @@ void LeastRecentlyUsedEvictionPolicy::Read(std::size_t position) {
}

void LeastRecentlyUsedEvictionPolicy::Written(std::size_t position) {
// This policy does not distinguish between read an writes.
// This policy does not distinguish between read and writes.
Read(position);
}

Expand Down
4 changes: 2 additions & 2 deletions cpp/backend/common/eviction_policy_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ BENCHMARK(BM_UniformWriteTest<RandomEvictionPolicy>)
BENCHMARK(BM_UniformWriteTest<LeastRecentlyUsedEvictionPolicy>)
->Range(kMinPoolSize, kMaxPoolSize);

// Evalutes the performance of removing elements from the pool.
// Evaluates the performance of removing elements from the pool.
template <EvictionPolicy Policy>
void BM_UniformRemoveTest(benchmark::State& state) {
auto pool_size = state.range(0);
Expand All @@ -81,7 +81,7 @@ BENCHMARK(BM_UniformRemoveTest<RandomEvictionPolicy>)
BENCHMARK(BM_UniformRemoveTest<LeastRecentlyUsedEvictionPolicy>)
->Range(kMinPoolSize, kMaxPoolSize);

// Evalutes the performance of selecting pages to be evicted.
// Evaluates the performance of selecting pages to be evicted.
template <EvictionPolicy Policy>
void BM_GetPageToEvictTest(benchmark::State& state) {
auto pool_size = state.range(0);
Expand Down
Loading