-
Notifications
You must be signed in to change notification settings - Fork 783
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
SFTP input - last file not deleted #2435
Comments
After looking at the code, it seems to be related to this code: if s.scanner, err = s.scannerCtor.Create(file, func(ctx context.Context, aErr error) (outErr error) {
_ = s.pathProvider.Ack(ctx, nextPath, aErr)
if aErr != nil {
return nil
}
if s.deleteOnFinish {
s.scannerMut.Lock()
client := s.client
if client == nil { The mutex seems to be locked and so the last file is not being deleted Maybe I am completely wrong, but in this case, do you need the mutex? #2436 |
Hey @joffreychambrin, we need some form of mutex there as we can't otherwise guarantee race conditions there. However, it should definitely be possible to fix this by reducing the scope of those locks. |
Hi 馃憢
I have discovered an issue when the sftp input component is configured with watcher enabled and delete_on_finish enabled.
Steps to reproduce:
Here is the configuration file I am using
The text was updated successfully, but these errors were encountered: