-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### What problem does this PR solve? 1. Fix bug: check storage mode instead of role in txn commit. In InfinityContext::ChangeRole, we first change role in cluster manager, then set storage mode which makes old transaction that not committed violate the check of role. So I changed to check storage mode. 2. Add log collect in embedded test. 3. Fix remove object file before upload. https://github.com/infiniflow/infinity/actions/runs/11789675361/job/32838815976?pr=2212 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
- Loading branch information
1 parent
4507682
commit d990b18
Showing
19 changed files
with
170 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[general] | ||
version = "0.5.0" | ||
time_zone = "utc-8" | ||
|
||
[network] | ||
server_address = "0.0.0.0" | ||
http_port = 23820 | ||
peer_ip = "0.0.0.0" | ||
peer_port = 23850 | ||
|
||
[log] | ||
log_filename = "infinity.log" | ||
log_dir = "/var/infinity/log" | ||
log_to_stdout = false | ||
log_level = "trace" | ||
|
||
[storage] | ||
persistence_dir = "/var/infinity/persistence" | ||
|
||
[buffer] | ||
buffer_manager_size = "8GB" | ||
temp_dir = "/var/infinity/tmp" | ||
result_cache = "on" | ||
|
||
[wal] | ||
wal_dir = "/var/infinity/wal" | ||
|
||
[resource] | ||
resource_dir = "/var/infinity/resource" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import argparse | ||
import os | ||
import random | ||
import shutil | ||
import string | ||
|
||
parser = argparse.ArgumentParser(description="Collect and copy embedded log files.") | ||
parser.add_argument( | ||
"--output_dir", type=str, required=True, help="Path to the output directory" | ||
) | ||
parser.add_argument("--failure", type=str, required=True, help="If the test failured") | ||
parser.add_argument( | ||
"--log_path", type=str, required=True, help="Path to the embedded log file" | ||
) | ||
|
||
args = parser.parse_args() | ||
output_dir = args.output_dir | ||
failure = args.failure == "true" or args.failure == "True" | ||
log_path = args.log_path | ||
show_lines = 1000 | ||
|
||
print(f"Embedded test {"failed" if failure else "succeeded"}") | ||
|
||
if not os.path.isdir(output_dir): | ||
os.makedirs(output_dir) | ||
|
||
if failure: | ||
random_name = "".join(random.choices(string.ascii_lowercase + string.digits, k=8)) | ||
print(f"Random log file name: {random_name}") | ||
|
||
if not os.path.isfile(log_path): | ||
print("Error: log file not found") | ||
elif failure: | ||
shutil.copy(log_path, f"{output_dir}/{random_name}_embedded.log") | ||
print(f"Last {show_lines} lines from {log_path}:") | ||
with open(log_path, "r") as f: | ||
lines = f.readlines() | ||
for line in lines[-show_lines:]: | ||
print(line.strip()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.