Skip to content

Conversation

@hermanschaaf
Copy link
Member

This is a fix for this error, encountered when postgresql plugin is run with overwrite-delete-stale mode:

Error: failed to write for gcp->postgresql: failed to CloseAndRecv client: rpc error: code = Canceled desc = got EOF. failed to wait for plugin: failed to execute batch: context canceled
2022-11-09T10:11:35Z ERR exiting with error error="failed to write for gcp->postgresql: failed to CloseAndRecv client: rpc error: code = Canceled desc = got EOF. failed to wait for plugin: failed to execute batch: context canceled" module=cli

The reason it didn't work before is that the grouperr context gets cancelled as soon as Wait() returns. We should be using the original ctx for the subsequent delete stale call.

This also fixes this error:

2022-11-09T10:02:22Z ERR failed to remove source socket file error="remove /var/folders/_c/hm9lkvfj7fz_rykn71rmr8gh0000gn/T/cq-WDwWDgDPiakfRkxi.sock: no such file or directory" module=cli

by using os.RemoveAll so that the file is removed if it is there, or ignored otherwise.

Copy link
Member

@erezrokah erezrokah left a comment

Choose a reason for hiding this comment

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

🚀

@erezrokah
Copy link
Member

I'll go ahead and force merge this cc @yevgenypats

@erezrokah erezrokah merged commit cd7bf6d into main Nov 9, 2022
@erezrokah erezrokah deleted the error-fixes branch November 9, 2022 11:38
kodiakhq bot pushed a commit that referenced this pull request Nov 9, 2022
🤖 I have created a release *beep* *boop*
---


## [1.1.1](v1.1.0...v1.1.1) (2022-11-09)


### Bug Fixes

* Context cancelled too early for delete stale mode ([#377](#377)) ([cd7bf6d](cd7bf6d))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.

4 participants