Skip to content

Commit 363d781

Browse files
committed
Merge remote-tracking branch 'upstream/eloq-10.6.10' into eloq-10.6.10
2 parents d8bac9f + 39691c0 commit 363d781

5 files changed

Lines changed: 77 additions & 3 deletions

File tree

.editorconfig

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# EditorConfig for C++ projects
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
# Common C++ source files
12+
[*.{cpp,cc,cxx}]
13+
indent_style = space
14+
indent_size = 2
15+
16+
# Header files
17+
[*.{hpp,h,hh,hxx,ixx}]
18+
indent_style = space
19+
indent_size = 2
20+
21+
# CMake files
22+
[CMakeLists.txt]
23+
indent_style = space
24+
indent_size = 2
25+
26+
[*.cmake]
27+
indent_style = space
28+
indent_size = 2
29+
30+
# Makefiles require tabs
31+
[Makefile]
32+
indent_style = tab
33+
34+
# Python scripts (often found in build systems)
35+
[*.py]
36+
indent_style = space
37+
indent_size = 4
38+
39+
# Shell scripts
40+
[*.sh]
41+
indent_style = space
42+
indent_size = 2
43+
44+
# Markdown documentation
45+
[*.md]
46+
trim_trailing_whitespace = false # Allow trailing spaces for line breaks
47+
max_line_length = 80
48+
49+
# JSON config files
50+
[*.json]
51+
indent_style = space
52+
indent_size = 2
53+
54+
# YAML config files
55+
[*.{yml,yaml}]
56+
indent_style = space
57+
indent_size = 2
58+
59+
# Git ignore
60+
[.gitignore]
61+
indent_style = space
62+
indent_size = 2
63+
64+
# Text files
65+
[*.txt]
66+
trim_trailing_whitespace = false

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,6 @@ compile_commands.json
538538
.clang-format
539539
.kscope/
540540
.vimrc
541-
.editorconfig
542541
.kateconfig
543542
*.kdev4
544543

storage/eloq/ha_eloq.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4152,6 +4152,7 @@ int ha_eloq::PkIndexScanOpen(const txservice::TxKey *start_key,
41524152
bool require_recs= decode_flag_ > 0;
41534153
bool require_sort= eloq_random_scan_sort ||
41544154
(active_index != MAX_INDEXES && decode_flag_ > 0);
4155+
end_specified_= end_key != nullptr;
41554156

41564157
auto [yield_func, resume_func]= my_tx->CoroFunctors();
41574158

@@ -4211,6 +4212,7 @@ int ha_eloq::SkIndexScanOpen(const txservice::TxKey *start_index_key,
42114212
bool is_require_keys= has_hidden_pk(table) || decode_flag_ > 0;
42124213
bool is_require_recs= is_require_keys;
42134214
bool is_require_sort= is_require_keys;
4215+
end_specified_= end_index_key != nullptr;
42144216

42154217
auto [yield_func, resume_func]= my_tx->CoroFunctors();
42164218

@@ -5212,7 +5214,7 @@ int ha_eloq::IndexScanClose()
52125214
ccm_scan_key_= nullptr;
52135215
ccm_scan_rec_= nullptr;
52145216
ccm_scan_rec_status_= txservice::RecordStatus::Unknown;
5215-
5217+
end_specified_= false;
52165218
scan_batch_idx_= UINT64_MAX;
52175219
if (scan_batch_.size() > DEFAULT_SCAN_TUPLE_SIZE)
52185220
{

storage/eloq/ha_eloq.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,12 @@ class ha_eloq : public handler
717717

718718
uint32_t PrefetchSize()
719719
{
720+
if (end_specified_)
721+
{
722+
// Prefetch more agressively if end key is specified as the scan
723+
// will not prefetch beyond the end key.
724+
return 256;
725+
}
720726
std::array<uint32_t, 5> boundaries= {1, 4, 16, 64, 256};
721727

722728
size_t idx= 0;
@@ -774,6 +780,7 @@ class ha_eloq : public handler
774780
txservice::TxKey search_tx_key_{&search_key_};
775781
EloqKey scan_end_key_;
776782
txservice::TxKey scan_end_tx_key_{&scan_end_key_};
783+
bool end_specified_{false};
777784

778785
uint64_t scan_alias_{UINT64_MAX};
779786
// index currently used if scan is active

0 commit comments

Comments
 (0)