Skip to content

Wait a little more time for the writer process#1373

Closed
gfphoenix78 wants to merge 1 commit into
apache:mainfrom
gfphoenix78:wait-writer
Closed

Wait a little more time for the writer process#1373
gfphoenix78 wants to merge 1 commit into
apache:mainfrom
gfphoenix78:wait-writer

Conversation

@gfphoenix78
Copy link
Copy Markdown
Contributor

When the reader process acquires a LOCK, it requires to get the writer PROC. For first time, the reader may not get the writer PROC. It's unknown why the reader can't find the writer. Wait a little more time for it.

+DETAIL:  connection to server at "172.18.0.2", port 7004 failed: FATAL:  reader could not find writer proc entry
+DETAIL:  lock [0,1260] AccessShareLock 0. Probably because writer gang is gone somehow. Maybe try rerunning.
+ERROR:  failed to acquire resources on one or more segments

Type of Change

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

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


volatile PGPROC * proc = FindProcByGpSessionId(gp_session_id);
int count = 0;
while(proc==NULL && count < 5)
while(proc==NULL && count < 200)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

which pipeline happened ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The internal pipeline that is not in github.

@avamingli
Copy link
Copy Markdown
Contributor

​​Isn't the root cause simply a lack of resources? ​`failed to acquire resources on one or more segments?

@gfphoenix78
Copy link
Copy Markdown
Contributor Author

​​Isn't the root cause simply a lack of resources? ​`failed to acquire resources on one or more segments?

Not a root cause.

When the reader process acquires a LOCK, it requires to get the writer
PROC. For first time, the reader may not get the writer PROC. It's unknown
why the reader can't find the writer. Wait a little more time for it.
@kongfanshen-0801
Copy link
Copy Markdown
Contributor

Maybe we should add new guc parameter to control the time to wait for writer gang process.
The new PR:
#1391

@my-ship-it
Copy link
Copy Markdown
Contributor

Close the PR because another PR created: #1391

@my-ship-it my-ship-it closed this Oct 15, 2025
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.

5 participants