-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: slow log to info #2935
fix: slow log to info #2935
Changes from 12 commits
c5cbb1f
d618282
b1163bd
3fcc14e
a4e81f1
60efd65
4522363
c3936d8
b34af68
f5ab80a
1f7caae
caed42d
4d7bf70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -156,7 +156,7 @@ jobs: | |||||||||||||
sh integrate_test.sh | ||||||||||||||
|
||||||||||||||
build_on_macos: | ||||||||||||||
runs-on: macos-12 | ||||||||||||||
runs-on: macos-13 | ||||||||||||||
|
||||||||||||||
steps: | ||||||||||||||
- uses: actions/checkout@v4 | ||||||||||||||
|
@@ -169,7 +169,7 @@ jobs: | |||||||||||||
- name: ccache | ||||||||||||||
uses: hendrikmuhs/[email protected] | ||||||||||||||
with: | ||||||||||||||
key: macos-12 | ||||||||||||||
key: macos-13 | ||||||||||||||
|
||||||||||||||
- name: Install Deps | ||||||||||||||
run: | | ||||||||||||||
|
@@ -188,7 +188,11 @@ jobs: | |||||||||||||
|
||||||||||||||
- name: Cleanup | ||||||||||||||
run: | | ||||||||||||||
rm -rf ./deps | ||||||||||||||
echo "What is $(pwd)" | ||||||||||||||
echo "Here are $(ls)" | ||||||||||||||
cp deps/lib/libz.1.dylib . | ||||||||||||||
cp deps/lib/libz.1.dylib tests/integration/ | ||||||||||||||
rm -rf ./deps | ||||||||||||||
Comment on lines
+191
to
+193
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add error handling for copy operations. While the placement of copy operations before cleanup is correct, consider adding error checking to ensure the operations succeed: - cp deps/lib/libz.1.dylib .
- cp deps/lib/libz.1.dylib tests/integration/
+ cp deps/lib/libz.1.dylib . || exit 1
+ cp deps/lib/libz.1.dylib tests/integration/ || exit 1 📝 Committable suggestion
Suggested change
|
||||||||||||||
rm -rf ./buildtrees | ||||||||||||||
|
||||||||||||||
- name: Test | ||||||||||||||
|
@@ -201,19 +205,18 @@ jobs: | |||||||||||||
./pikatests.sh all clean | ||||||||||||||
|
||||||||||||||
- name: Start codis, pika master and pika slave | ||||||||||||||
working-directory: ${{ github.workspace }}/build | ||||||||||||||
run: | | ||||||||||||||
chmod +x ../tests/integration/start_master_and_slave.sh | ||||||||||||||
../tests/integration/start_master_and_slave.sh | ||||||||||||||
chmod +x ../tests/integration/start_codis.sh | ||||||||||||||
../tests/integration/start_codis.sh | ||||||||||||||
working-directory: ${{ github.workspace }} | ||||||||||||||
run: | | ||||||||||||||
echo "This is $(pwd)" | ||||||||||||||
cd tests/integration/ | ||||||||||||||
chmod +x start_master_and_slave.sh | ||||||||||||||
./start_master_and_slave.sh | ||||||||||||||
|
||||||||||||||
- name: Run Go E2E Tests | ||||||||||||||
working-directory: ${{ github.workspace }}/build | ||||||||||||||
working-directory: ${{ github.workspace }} | ||||||||||||||
run: | | ||||||||||||||
cd ../tools/pika_keys_analysis/ | ||||||||||||||
go test -v ./... | ||||||||||||||
cd ../../tests/integration/ | ||||||||||||||
echo "That is $(pwd)" | ||||||||||||||
cd tests/integration/ | ||||||||||||||
chmod +x integrate_test.sh | ||||||||||||||
sh integrate_test.sh | ||||||||||||||
|
||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,7 +98,7 @@ masterauth : | |
# [Advice] It's recommended to add high-risk commands to this list. | ||
# [Format] Commands should be separated by ",". For example: FLUSHALL, SHUTDOWN, KEYS, CONFIG | ||
# By default, this list is empty. | ||
# userblacklist : | ||
userblacklist : | ||
|
||
# Running Mode of Pika, The current version only supports running in "classic mode". | ||
# If set to 'classic', Pika will create multiple DBs whose number is the value of configure item "databases". | ||
|
@@ -110,7 +110,7 @@ instance-mode : classic | |
# The value range of this parameter is [1, 8]. | ||
# [NOTICE] It's RECOMMENDED to set sync-binlog-thread-num equal to DB num(databases), | ||
# if you've changed the value of databases, remember to check if the value of sync-binlog-thread-num is proper. | ||
databases : 1 | ||
databases : 3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Update sync-binlog-thread-num to match the number of databases The verification confirms that
🔗 Analysis chainVerify sync-binlog-thread-num configuration. The databases value has been increased to 3, but according to the documentation, it's recommended to set 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Check if sync-binlog-thread-num is properly configured
grep -A 1 "sync-binlog-thread-num :" tests/assets/default.conf
Length of output: 365 Script: #!/bin/bash
# Let's check sync-binlog-thread-num in all relevant configuration files
echo "=== Checking tests/assets/default.conf ==="
grep -A 1 "sync-binlog-thread-num" tests/assets/default.conf
echo -e "\n=== Checking conf/pika.conf ==="
grep -A 1 "sync-binlog-thread-num" conf/pika.conf
echo -e "\n=== Checking tests/conf/pika.conf ==="
grep -A 1 "sync-binlog-thread-num" tests/conf/pika.conf
# Also check for any comments or documentation about this setting
echo -e "\n=== Checking for documentation about sync-binlog-thread-num ==="
rg "sync-binlog-thread-num" -B 2 -A 2
Length of output: 6874 |
||
|
||
# The number of followers of a master. Only [0, 1, 2, 3, 4] is valid at present. | ||
# By default, this num is set to 0, which means this feature is [not enabled] | ||
|
@@ -307,13 +307,13 @@ max-write-buffer-size : 10737418240 | |
# If max-write-buffer-num > 3, writing will be slowed down. | ||
max-write-buffer-num : 2 | ||
|
||
# `min_write_buffer_number_to_merge` is the minimum number of memtables | ||
# that need to be merged before placing the order. For example, if the | ||
# option is set to 2, immutable memtables will only be flushed if there | ||
# are two of them - a single immutable memtable will never be flushed. | ||
# If multiple memtables are merged together, less data will be written | ||
# to storage because the two updates are merged into a single key. However, | ||
# each Get() must linearly traverse all unmodifiable memtables and check | ||
# `min_write_buffer_number_to_merge` is the minimum number of memtables | ||
# that need to be merged before placing the order. For example, if the | ||
# option is set to 2, immutable memtables will only be flushed if there | ||
# are two of them - a single immutable memtable will never be flushed. | ||
# If multiple memtables are merged together, less data will be written | ||
# to storage because the two updates are merged into a single key. However, | ||
# each Get() must linearly traverse all unmodifiable memtables and check | ||
# whether the key exists. Setting this value too high may hurt performance. | ||
min-write-buffer-number-to-merge : 1 | ||
|
||
|
@@ -401,7 +401,7 @@ thread-migrate-keys-num : 64 | |
default-slot-num : 1024 | ||
|
||
# enable-partitioned-index-filters [yes | no] | ||
# When `cache-index-and-filter-blocks` is enabled, `pin_l0_filter_and_index_blocks_in_cache` | ||
# When `cache-index-and-filter-blocks` is enabled, `pin_l0_filter_and_index_blocks_in_cache` | ||
# and `cache-index-and-filter-blocks` is suggested to be enabled | ||
# https://github.com/facebook/rocksdb/wiki/Partitioned-Index-Filters | ||
# enable-partitioned-index-filters: default no | ||
|
@@ -424,7 +424,7 @@ default-slot-num : 1024 | |
# https://github.com/EighteenZi/rocksdb_wiki/blob/master/Rate-Limiter.md | ||
#######################################################################E####### | ||
|
||
# rate limiter mode | ||
# rate limiter mode | ||
# 0: Read 1: Write 2: ReadAndWrite | ||
# rate-limiter-mode : default 1 | ||
|
||
|
@@ -520,7 +520,6 @@ zset-cache-field-num-per-key : 512 | |
# If zset-cache-start-direction is -1, cache the last 512[zset-cache-field-num-per-key] elements | ||
zset-cache-start-direction : 0 | ||
|
||
|
||
# the cache maxmemory of every db, configuration 10G | ||
cache-maxmemory : 10737418240 | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Warning: The
deps
directory copy operations will failThe workflow shows that the
deps
directory is cleaned up in a previous step before these copy operations:Then immediately after, it attempts to copy files from the already deleted
deps/lib/libz.1.dylib
. This will always fail as the source files no longer exist.deps
directory🔗 Analysis chain
Verify dynamic library copy operations.
The copy operations for
libz.1.dylib
are crucial for the tests. Let's verify the file locations and permissions.Let me check the workflow file to understand the context of these copy operations better.
Let me check if the
deps
directory is created in a previous step of the workflow.Let me check the entire workflow file to understand the complete setup process.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 606
Script:
Length of output: 378
Script:
Length of output: 591
Script:
Length of output: 8181