Skip to content

clone partial columns of aligned tvlist for query - #18409

Draft
shuwenwei wants to merge 1 commit into
masterfrom
partial_tvlist_clone
Draft

clone partial columns of aligned tvlist for query#18409
shuwenwei wants to merge 1 commit into
masterfrom
partial_tvlist_clone

Conversation

@shuwenwei

Copy link
Copy Markdown
Member

Cherry-picked from #18394 ([To dev/1.3] clone partial columns of aligned tvlist for query).

Commit: edeb7c5276

For queries that touch only a few columns of a wide aligned device, clone only the accessed columns of the working AlignedTVList instead of the whole list, then swap the working list so the unaccessed columns are moved out. This dramatically reduces the memory retained by such queries on wide aligned devices.

This cherry-pick also carries over the follow-up fixes from the dev/1.3 PR:

  • prepareTvListMapForQuery retries under the memChunk lock after acquiring the candidate's queryListLock, so a swapped working list can never be operated on while holding a stale lock.
  • Memory reservation is made before clone allocation and rolled back on failure; the clone and working-list swap happen atomically under the memChunk critical section.
  • Non-query columns are released before ownership transfer to the first query.
  • Aligned RamInfo accounting keeps reservation and cleanup sizes consistent.

Adapted to the current master APIs (IFullPath/AlignedFullPath, ModEntry, table-model chunk metadata, i18n messages) during conflict resolution.

@shuwenwei shuwenwei changed the title [To master] clone partial columns of aligned tvlist for query clone partial columns of aligned tvlist for query Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant