Skip to content

Conversation

roseduan
Copy link
Contributor

@roseduan roseduan commented Oct 9, 2025

The variable segNumber in foreign.c was defined but never used, which is not necessary.

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


The variable `segNumber` in foreign.c was defined but never used,
which is not necessary.
Comment on lines -422 to -424
int segNumber;

segNumber = GetForeignTableSegNumbers(relid);
Copy link
Contributor

Choose a reason for hiding this comment

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

The codes are introduced by CBDB at commit ed64982,

It looks like the intent to update ForeignTable.num_segments was missed or forgotten in this block, specifically around line 440. Instead of deleting the logic, we should ensure ForeignTable.num_segments is assigned the correct value there.

cc @oppenheimer01

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.

2 participants