optimize HBase request and response CPU performance - #442
Merged
WeiXinChan merged 5 commits intoSep 1, 2026
Conversation
Make response CRC optional, accelerate object type lookup, preallocate query results, add KQTV fast decoding, and expose compact HBase result batches.
Reduce CPU usage and object allocation when constructing and encoding HBase Put V2 requests.
Preallocate Batch Get response containers and replace object type map lookups with a hybrid array/map lookup. Propagate Batch Get decode context through LS responses and decode K/Q/T/V values directly into compact HBase cell batches. Keep the generic ObObj decoder as a compatibility fallback.
This was referenced Aug 31, 2026
Contributor
Author
AI Coding Review审查范围: [P1] 不应在性能优化中无条件移除响应 CRC32C 校验位置:[ObTableRemoting.java (line 107)]
建议:
Review 结论合入前至少需要恢复或替代响应完整性校验。 |
WeiXinChan
approved these changes
Sep 1, 2026
Contributor
|
LGTM |
This file contains hidden or 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
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.
Summary
This PR optimizes CPU usage and object allocation on the OBKV HBase request and response hot paths.
The changes focus on HBase query/scan response decoding, Batch Get response decoding, Put V2 request encoding, object type lookup, CRC32C calculation, and result container allocation.
Solution Description
The optimization consists of four related changes:
Optimize HBase query and scan response decoding
ObHBaseCellBatchrepresentation for K/Q/T/V results.ObObjand row-list allocations.ObObjdecoding as a compatibility fallback when the schema or object metadata does not match the expected HBase K/Q/T/V layout.Optimize HBase Put V2 request encoding
Optimize HBase Batch Get response decoding
GET_LISTandBATCHrequests.Optimize common request-path utilities
ObBytesStringoffset and length during serialization, conversion, and partition hashing.The wire format remains compatible. Existing generic decoding and legacy Put representations are preserved as fallback paths.
Targeted unit tests were added or updated for compact query decoding, stream decoding, Batch Get decoding, Put encoding, type lookup, byte-slice handling, hashing, and CRC32C calculation. The newly added optimization-path tests pass locally. Full integration tests require a configured OceanBase/ZDAL test environment and were not run locally.