-
Notifications
You must be signed in to change notification settings - Fork 7
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
refactor(logstream): use beginLLSN in Replicate method #958
Open
ijsong
wants to merge
10
commits into
main
Choose a base branch
from
beginllsn_in_replicate
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## use_grpc_codec_v2 #958 +/- ##
=====================================================
- Coverage 80.07% 80.02% -0.05%
=====================================================
Files 179 179
Lines 21565 21569 +4
=====================================================
- Hits 17268 17261 -7
- Misses 3512 3517 +5
- Partials 785 791 +6 ☔ View full report in Codecov by Sentry. |
hungryjang
approved these changes
Feb 1, 2025
859ee20
to
620cb18
Compare
984faf6
to
793fc5e
Compare
- Add tests for StorageNodeMetadataDescriptor and LogStreamReplicaMetadataDescriptor - Test methods: ToStorageNodeDescriptor, GetLogStream, Head, and Tail - Ensure proper coverage for edge cases and nil values
- Add comments for SyncPosition.InvalidSyncPosition, SyncPosition.Invalid, SyncPosition.LessThan, SyncRange.InvalidSyncRange, and SyncRange.Validate methods. - Add unit tests for SyncRange validation and invalid cases.
- replaced InvalidLogEntry with an empty LogEntry across the codebase - removed proto/varlogpb/log_entry.go as it contained unused code - updated related files to reflect these changes
- Removed unused functions from metadata.go - Added comprehensive unit tests for metadata.go and metadata_test.go - Improved test coverage for various scenarios
- Added `proto/varlogpb/replica_test.go` to test `EqualReplicas` and `ValidReplicas` functions. - Included various test cases to ensure correct functionality.
- Added new file: proto/varlogpb/storage_node_test.go - Includes tests for StorageNodeDescriptor validation
- Added unit tests for StoppableListener to cover various scenarios: - Valid and invalid addresses - Accepting connections after stopping - Successful connection acceptance - Improved test coverage and ensured reliability of the StoppableListener implementation.
- Added `pkg/util/testutil/testutil_test.go` for unit testing. - Removed unused functions from `pkg/util/testutil/testutil.go`.
This PR updates the gRPC codec from v1 to v2, enhancing performance and reducing memory allocations by utilizing a memory pool for encoded messages. Refs: - grpc/grpc-go#7356 - vitessio/vitess#16790
This commit replaces llsnList with beginLLSN in the Replicate method. Since LLSNs in llsnList are strictly sequential, beginLLSN and the length of dataList are sufficient. The corresponding tests have been updated to reflect this change. The llsn field in ReplicateRequest has been deprecated and will be removed soon.
620cb18
to
9ee82d7
Compare
793fc5e
to
45a6d6b
Compare
101fbbc
to
e7002e3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
This commit replaces llsnList with beginLLSN in the Replicate method. Since
LLSNs in llsnList are strictly sequential, beginLLSN and the length of dataList
are sufficient. The corresponding tests have been updated to reflect this
change. The llsn field in ReplicateRequest has been deprecated and will be
removed soon.