yanboer commented on issue #1465: URL: https://github.com/apache/cloudberry/issues/1465#issuecomment-3605382000
## problem reason The issue arises from the time difference between QE releasing the lock and writing to DistributedLog, and QD removing itself from allTmGxact. When committing a transaction, the QE first calls `notifyCommittedDtxTransaction` [xact.c#L2956](https://github.com/apache/cloudberry/blob/2.0.0-incubating/src/backend/access/transam/xact.c#L2956) to commit the transaction in QE - QE will commit its transaction, release the lock, and write to the DistributedLog. QD will remove itself from allTmGxact after [procarray.c#L746](https://github.com/apache/cloudberry/blob/2.0.0-incubating/src/backend/storage/ipc/procarray.c#L746) (Other transactions can still see the GXID when GetSnapshotData [procarray.c#L2665](https://github.com/apache/cloudberry/blob/2.0.0-incubating/src/backend/storage/ipc/procarray.c#L2665)). During this period, other transactions can see the data deleted by the current transaction (the gxid corresponding to xmax is still active). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
