This is a simple PR to allow tablesnap to also be able to watch for IN_CREATE events, which can be useful for commitlog_archiving. With commitlog_archiving, the typical command is to create a hard link once the CLog is full; however with the current inotify events it does not see it:
archive_command: /bin/ln %path /backup/%name
Having tablesnap watch the /backup directory, everytime there is a new link...nothing happens. If the command was /bin/cp, it works (but that will incur a performance impact)
From my own debugging, it seems like the event is IN_CREATE:
Hi Jeremy,
This is a simple PR to allow tablesnap to also be able to watch for IN_CREATE events, which can be useful for commitlog_archiving. With commitlog_archiving, the typical command is to create a hard link once the CLog is full; however with the current inotify events it does not see it:
archive_command: /bin/ln %path /backup/%name
Having tablesnap watch the /backup directory, everytime there is a new link...nothing happens. If the command was
/bin/cp
, it works (but that will incur a performance impact)From my own debugging, it seems like the event is
IN_CREATE
:This will make tablesnap useful for backing up CLogs as well, WDYT? I tested it on my test cluster.
Thanks!