Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
|
New Issues (6)Checkmarx found the following issues in this Pull Request
Fixed Issues (4)Great job! The following issues were fixed in this Pull Request
|
There was a problem hiding this comment.
Pull Request Overview
This PR addresses two flaky test cases that were causing unreliable test results. The first fix modifies the active defragmentation test to create hash keys instead of string keys for better fragmentation patterns. The second fix removes encoding verification checks that were sensitive to changes in Redis's internal encoding thresholds.
- Replaced string key creation with hash key creation in the memory efficiency defrag test to ensure consistent fragmentation behavior
- Removed object encoding verification checks from the protocol test to eliminate dependency on internal encoding size limits
- Updated comment references to match the modified test operations
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/unit/protocol.tcl | Removes object encoding assertions that depend on internal encoding size limits |
| tests/unit/memefficiency.tcl | Changes test to use hash keys instead of string keys for more predictable defragmentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.



This PR mainly fixes two flakiness tests.
Fix the failure of
Active Defrag HFE with ebraxtest inmemefficiency.tclWhen
redisObjectstructure size changes, the current test design becomes flakiness:In the current test, we will create 1 hash key + N string keys. When we delete this string key, these hash keys may be evenly distributed in robj 's slabs, resulting in the inability to perform defragmentation.
Fix
bulk reply protocoltest inprotocol.tclintroduced by Fix index error of CRLF when replying with integer-encoded strings #13711When
OBJ_ENCODING_EMBSTR_SIZE_LIMIT(currently 44) changes, it can cause this test to fail. This isn't necessarily a problem, but the main issue is that we userawreadto verify encoding correctness. If the reply length doesn't match exactly, it can cause the test to hang and become difficult to debug.