Skip to content

fileOp causing problems in polls, watches #1770

Description

@reidsunderland

Watches and polls post fileOp messages by default (e.g. renames, mkdirs, links, delete), but this is usually unexpected and surprising, especially when downloading to a cluster.

I think we need a convenient, built in way to suppress fileOp messages and publish normal "file download" messages instead.

For example, a watch. A user uploads files named SOMETHING.TMP then renames to SOMETHING. The watch publishes two messages:

  1. a normal download mesages for SOMETHING.TMP
  2. a rename event to rename SOMETHING.TMP to SOMETHING

This is confusing outside of mirroring. The SOMETHING.TMP message fails to download (because SOMETHING.TMP is renamed and gone by the time the sarra tries to download it). And the rename message causes an error, because SOMETHING.TMP didn't get downloaded (even if it did, there's a good chance it would have been downloaded to another node). The rename message should fall through to download, so the file isn't lost, but the errors cause a lot of confusion.

Similar with links, when we are polling or posting files, usually we just want to receive a copy of the file. We don't want a link on our cluster, we want the actual file.

Posting directories (mkdir events) are mostly harmless, but they cause errors when v2 subscribers/sarras try to download them.

Changing the fileEvents option doesn't solve all of these cases. We usually use fileEvents create,modify because we need to detect creations and modifications (existing file gets overwritten or updated), but this causes renames to be posted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Discussion_Neededdevelopers should discuss this issue.v2compatibilityproblem with sr3 and v2 work together.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions