Skip to content

Varchar 1 fix on parallel ingestion.#3131

Merged
khustup2 merged 1 commit into
mainfrom
parallel-type-fix
Feb 8, 2026
Merged

Varchar 1 fix on parallel ingestion.#3131
khustup2 merged 1 commit into
mainfrom
parallel-type-fix

Conversation

@khustup2
Copy link
Copy Markdown
Contributor

@khustup2 khustup2 commented Feb 8, 2026

🚀 🚀 Pull Request

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Things to be aware of

Things to worry about

Additional Context

@claude
Copy link
Copy Markdown

claude Bot commented Feb 8, 2026

Claude finished @khustup2's task in 1m 21s —— View job


PR Review Complete ✓

Summary

The fix correctly addresses the bug where format_type_be() was dropping type modifiers (like the length in VARCHAR(1)), causing catalog sync issues in parallel ingestion scenarios. The change to format_type_with_typemod() properly preserves type modifiers when storing column metadata in the shared catalog.

What I verified:

  • ✓ Core C++ fix in table_storage.cpp:261 is correct and minimal
  • ✓ Other usages of format_type_be() are in error messages only (appropriate usage)
  • ✓ Comprehensive regression test added with clear documentation of the bug
  • ✓ Test validates the critical path: Instance B writing to a VARCHAR(1) column discovered from catalog

Found 1 minor issue - see inline comment about bidirectional sync validation.


@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 8, 2026

assert rows_b[2]['flag'] == 'Y'
print("Instance B: VARCHAR(1) and CHAR(1) data read back correctly!")

print("Instance B: All VARCHAR(1) write and read operations succeeded")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test doesn't verify bidirectional sync: Instance A can't see Instance B's writes. Add a verification that primary_conn can SELECT the 3 rows after Instance B inserts them (before cleanup), confirming the catalog sync works both ways.

@khustup2 khustup2 merged commit c52d96f into main Feb 8, 2026
6 checks passed
@khustup2 khustup2 deleted the parallel-type-fix branch February 8, 2026 10:52
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