[CBRD-26956] Partially revert CBRD-26663: drop variable header + length, keep only CHAR fixed-to-variable + compression (feature → develop)#7326
Open
jongmin-won wants to merge 6 commits into
Conversation
…th, keep only CHAR fixed-to-variable + compression
❌ TC Merge Gate — Merge BlockedOne or more TC PRs are still open. Please merge or close them before merging this PR. TC Repositories & Branches:
Steps to unblock:
|
🧪 TC Test Environment ReadyCircleCI Testing:
TC Repositories & Branches:
Next Steps:
|
…th, keep only CHAR fixed-to-variable + compression (→ feature/revert-CBRD-26663-char-vlen) (#7327) http://jira.cubrid.org/browse/CBRD-26956 Fully revert CBRD-26663 (unified variable-length storage for CHAR/VARCHAR), which caused the benchmark (YCSB/sysbench) performance regression, then re-port only the CHAR storage improvement that does not introduce the regression. 1. Full revert of CBRD-26663 (squash merge 83b29b0) - Restore the pre-unification string storage layout: VARCHAR uses the byte_size-based header and CHAR uses fixed-length storage. - Remove the variable headers (Tiny/Small/Medium/Large) and the length (character-count) field that increased VARCHAR storage size and caused the performance regression. 2. Re-port CHAR to variable-length storage with LZ4 compression - Re-port only the CHAR-related part of CBRD-26663 so CHAR is stored using variable-length storage with LZ4 compression, like VARCHAR, while preserving CHAR's precision-padding semantics. - Add the pr_pad_char_to_precision() helper so precision padding is applied uniformly in the storage layer. - Extend the string compression/decompression path and replace VARCHAR-only checks with TP_IS_CHAR_TYPE so CHAR follows the same path. 3. Fix loaddb regression + uninitialized partition-expression serialization - xasl_to_stream.c: The unwritten tail of the serialization stream was left uninitialized, making the character-count computation for CHAR values stored in partition expressions non-deterministic and causing intermittent ER_TF_SIZE_MISMATCH errors. - load_sa_loader.cpp: Clean up the initialization and cleanup of the hand-built DB_VALUE to remove uninitialized references and padding-buffer leaks in the variable-length CHAR storage path. - object_primitive.c: Cache char_count where padding is guaranteed to avoid a multi-byte re-walk. 4. Review feedback - xasl_to_stream.c: Zero only the unwritten tail instead of the entire buffer. - object_representation_sr.c: Relax the attribute-length assertion since empty strings (e.g. COMMENT '') can be stored legitimately (corruption cases are still detected). - string_opfunc.c: Tidy the dest_prec assignment (behavior unchanged).
…BRD-26663-char-vlen Resolve conflict in src/storage/page_buffer.c: adopt develop's THREAD_ENTRY-based pgbuf fix/unfix monitor counters (CBRD-26941) over the feature branch's thread_counters shard array; both replace the same base global counters, so the canonical develop implementation is kept.
Contributor
|
Reviews (1): Last reviewed commit: "Merge remote-tracking branch 'upstream/d..." | Re-trigger Greptile |
…BRD-26663-char-vlen
Contributor
|
Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'upstream/d..." | Re-trigger Greptile |
Contributor
Author
|
/run all |
…BRD-26663-char-vlen
Contributor
|
Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'upstream/d..." | Re-trigger Greptile |
Contributor
Author
|
/run all |
…BRD-26663-char-vlen
Contributor
Author
|
/run all |
Contributor
|
Reviews (4): Last reviewed commit: "Merge remote-tracking branch 'upstream/d..." | Re-trigger Greptile |
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.
http://jira.cubrid.org/browse/CBRD-26956
Purpose
CBRD-26663(CHAR/VARCHAR 통합, #7164)에서 도입한 가변 헤더(Tiny/Small/Medium/LARGE) + length(글자 수) 헤더 저장이 VARCHAR 저장 용량을 늘려 성능 저하(YCSB)를 유발했다.
이를 통합 전으로 되돌리되, Sysbench에서 이득이 확인된 CHAR 고정→가변 저장 및 압축만 유지한다.
Implementation
본 변경은 두 단계로 구성된다.
1) CBRD-26663 전체 revert (#7164)
83b29b02를 전체 revert → 통합 전 문자열 저장 구조로 복원.byte_size기반 헤더로 복귀, 가변 헤더 4종 분기 및length(char_count)필드 제거.object_representation.*,object_primitive.*,string_opfunc.*,query_executor.c,query_aggregate.cpp,object_domain.c,loaddb/*,parse_evaluate.c,network_interface_sr.cpp등 18개 파일.2) CHAR 고정→가변 재이식
tp_String)의 가변 저장 경로(mr_*_string)를 본떠 CHAR(tp_Char) 경로를 작성. 헤더는 VARCHAR와 동일한byte_size only(length·가변 tier 없음).0x20) 유지, 비교 시 trailing-space 무시 semantic 유지.tp_Char.variable_p = 1,pr_midxkey_element_disk_sizeCHAR element 허용.byte_size임계 이상에서 압축.Remarks