Skip to content

Conversation

@drozhkov
Copy link

@drozhkov drozhkov commented Jun 20, 2024

#87

#include "FAnotifyFsBackend.hh"

void FAnotifyFsBackend::start() {
throw std::runtime_error("not implemented");

Choose a reason for hiding this comment

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

I don't know if we'd want to have an unimplemented backend here. And I'm unsure if we'd even end up implementing this one due to the elevated system permissions that it requires (CAP_SYS_ADMIN)

Copy link
Author

Choose a reason for hiding this comment

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

fixed
'fanotify-fs' backend is completely removed from the code

@drozhkov drozhkov changed the title #87 fanotify backend Jun 25, 2024
@drozhkov drozhkov requested a review from benmccann December 31, 2024 17:12
@@ -0,0 +1,2491 @@
{

Choose a reason for hiding this comment

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

this file should not be added since the project uses yarn

res.Set(String::New(env, "type"), String::New(env, type.c_str()));
res.Set(String::New(env, "pathFrom"), String::New(env, pathFrom.c_str()));
res.Set(String::New(env, "pathTo"), String::New(env, pathTo.c_str()));
res.Set(String::New(env, "type"), String::New(env, (isMoved ? "move" : isCreated ? "create" : isDeleted ? "delete" : "update")));
Copy link
Member

Choose a reason for hiding this comment

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

This would need to be done in a major version, with parity across all watcher backends. We need to ensure that the events emitted are consistent across platforms so that consumers can rely on the behavior.

Choose a reason for hiding this comment

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

This is a new backend and using it would be on an opt-in basis, so it's not a breaking change. Unfortunately, you can't reliably implement move with other backends - that's the motivation for introducing this new backend - to be able to reliably be able to detect and track move events

Choose a reason for hiding this comment

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

I think we could also introduce an option for move. The backend could emit separate create and delete events for a move by default to remain compatible with the other backends. Or you could opt-in to having it emit a move event instead

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