71133 [pool-1-thread-1] INFO com.mapr.fs.application.Monitor - ENTRY_DELETE: /mapr/cluster1.mapr.com/volumes/vol1/hello.txt
71133 [pool-1-thread-1] INFO com.mapr.fs.application.Monitor - ENTRY_CREATE: /mapr/cluster1.mapr.com/volumes/vol1/foo/hello.txt
71553 [Thread-3] INFO com.mapr.fs.JsonProducer - Sending to stream: topic</fsmonitor:change_vol1> key</mapr/cluster1.mapr.com/volumes/vol1>
71555 [Thread-3] INFO com.mapr.fs.JsonProducer - Sending to stream: topic</fsmonitor:change_vol1> key</mapr/cluster1.mapr.com/volumes/vol1>
71557 [Thread-3] INFO com.mapr.fs.application.Monitor - send to stream -> RENAME
On the target:
nothing happens, the foo folder is empty and the hello.txt file stays in the same original folder
Log for the consumer receiving the mv:
74553 [pool-1-thread-1] INFO com.mapr.fs.application.Consumer - vol1: ConsumerRecord(topic = /fsmonitor_replica:change_vol1, partition = 0, offset = 15166, timestamp = 1470111974455, producer = mapr, key = /mapr/cluster1.mapr.com/volumes/vol1, value = {"type":"rename_from","oldName":"hello.txt","newName":"hello.txt"})
74555 [pool-1-thread-1] INFO com.mapr.fs.application.Consumer - vol1: ConsumerRecord(topic = /fsmonitor_replica:change_vol1, partition = 0, offset = 15167, timestamp = 1470111974455, producer = mapr, key = /mapr/cluster1.mapr.com/volumes/vol1, value = {"type":"rename_to","oldName":"hello.txt","newName":"hello.txt"})
74557 [pool-1-thread-1] INFO com.mapr.fs.dao.ConsumerDAO - Check DB
74614 [pool-1-thread-1] INFO com.mapr.fs.events.RenameToEvent - Executing rename event: /mapr/cluster2.mapr.com/volumes_replica/vol1/hello.txt -> /mapr/cluster2.mapr.com/volumes_replica/vol1/hello.txt
74614 [pool-1-thread-1] INFO com.mapr.fs.events.RenameToEvent - Rename successful: /mapr/cluster2.mapr.com/volumes_replica/vol1/hello.txt -> /mapr/cluster2.mapr.com/volumes_replica/vol1/hello.txt
74623 [pool-1-thread-1] INFO com.mapr.fs.events.RenameToEvent - {"_id":"/mapr/cluster2.mapr.com/volumes_replica/vol1/hello.txt","name":"hello.txt","path":"/mapr/cluster2.mapr.com/volumes_replica/vol1/hello.txt","creationTime":"2016-08-02T04:25:48.001954Z","lastModified":"2016-08-02T04:25:48.001954Z","size":0,"directory":false,"removed":false}
This is probably due to the fact that when we do to "rename" (that is also a move) we do not keep the path in the message. (what about adding the path in all messages)
Here is the steps to reproduce the bug:
In the "source cluster" where the monitor is running
Log for the last operation (
mv
):On the target: nothing happens, the
foo
folder is empty and thehello.txt
file stays in the same original folderLog for the consumer receiving the
mv
:This is probably due to the fact that when we do to "rename" (that is also a move) we do not keep the path in the message. (what about adding the path in all messages)