Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uninitialized value in segno calculation #831

Merged
merged 13 commits into from
Jan 6, 2025
Merged

Conversation

avamingli
Copy link
Contributor

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


@yjhjstz
Copy link
Member

yjhjstz commented Jan 3, 2025

better to squash Fix uninitialized value in segno calculation and fix xlog.

@my-ship-it
Copy link
Contributor

Change commit message plz?

HustonMmmavr and others added 13 commits January 6, 2025 14:42
This patch fixes misleading error message when test binaries
`pg_regress/pg_isolation2_regress` are executed with the newer version
of `.pm` scripts.

For example: test binaries are builded at previous gpdb version
(previous commit) and `./configure` script is called again, so
`src/test/regress/GPTest.pm` (which stores version of gpdb at
`$VERSION` constant) file is generated with newer version. And run of
these tests exits with next error message: "The program "gpdiff.pl" is
needed by pg_regress but was not found in the same\n directory as
"/.../src/test/regress/pg_regress". But the real problem is next:
`GP_VERSION` from binaries doesn't equal `$VERSION` from `GPTest.pm`
script.
Fixme:
src/backend/gpopt/translate/CContextDXLToPlStmt.cpp:
// GPDB_12_MERGE_FIXME: we haven't seen the scan id yet, this scan id is likely
// for dynamic pruning.

Action:
Check not used elsewhere. Static partition elimination result now referenced by
m_part_indexes. Check and redundant declaration removed.
Fixme:
src/backend/gpopt/translate/CTranslatorDXLToPlStmt.cpp:
// GPDB_12_MERGE_FIXME: this duplicates a check in ExecInitProjectSet

Action:
None. Function SanityCheckProjectSetTargetList share some code with
ExecInitProjectSet. But refactoring isn't trivial and will involve changes to
upstream .c files. This check will be removed after PR #14302 is merged. For
now, remove the FIXME tag to avoid confusion.
Strip out segment number when comparing ICW diff
…h when MQ has no space (#14925)

If foreign table has lots of data, and we only retrieve few tuples in retrieve conn,
Sender will be waiting in WaitLatch due to MQ has no space.
Add testcase to test sender can be notified when cursor is closed.
* This commit is to fix issue #14528.

Now we usually use CREATE EXTERNAL TABLE syntax to create an external table in gpdb, which can set default value while missing some options, such as option `execute_on`.

But if we use CREATE FOREIGN TABLE syntax to create an external table, it won't set the default value while missing option `execute_on`.
In this case, missing option `execute_on` will cause gpdb crashing. (Issue #14528)

In this commit, when using CREATE FOREIGN TABLE syntax to create an external table and missing option `execute_on` , we will set default value for option `execute_on`.
This is the negligence of PR #14733.

As the title said, this PR is just trying to fix the failed unit test of test_unit_gpcheckresgroupimpl.py
make each external table options delimited by space.

currently only csv and text fmtopts output is delimited by space. This commit makes all formatters align
Minor correction that we don't need to call pstrdup() when initializing
the query string. exec_mpp_query() would fill in a dummy string if it
is empty.

Noticed this when testing some specific workloads and seeing overheads
in memory allocator caused by this. Didn't dig more into the impact but
let's just fix it anyway.
rename master to main in gpload.py

**Signed-off-by:** Yongtao Huang <[email protected]>
rename master to coordinator in gpfdist

**Signed-off-by:** Yongtao Huang <[email protected]>
icproxy processes communicate with each other with the public addr:port (see gp_interconnect_proxy_addresses), but no auth control here. So, any connection may connect in and send any byte, it may cause some unexpected exceptions (e.g. OOM).

In the PR, introduces a magic number field in the ICProxyPkt and does a sanity check: drop the corresponding package if magic number doesn't match.

This method does not attempt to solve all problems, but only as a simple solution to avoid internal misaccess, looks it's good enough.
Remove previous hack in KeepLogSeg that added a case to deal with a
(badly represented) invalid segment number.  This was added for the sake
of GetWALAvailability.  But it's not needed if in that function we
initialize the segment number to be retreated to the currently being
written segment, so do that instead.

Per valgrind-running buildfarm member skink, and some sparc64 animals.

Discussion: https://postgr.es/m/[email protected]
(cherry picked from commit 794e8e32bb5ae1b38a90cbae2a88895633797599)
@avamingli
Copy link
Contributor Author

Change commit message plz?

done

@my-ship-it my-ship-it merged commit c7397dc into apache:main Jan 6, 2025
22 checks passed
@avamingli avamingli deleted the cp_4 branch January 6, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick cherry-pick upstream commts
Projects
None yet
Development

Successfully merging this pull request may close these issues.