Hello ZooKeeper community,
In ZK (3.4.6) related tests, if I try to delete ZK data directory
immediatelly after calling shutdown on server connection factory, only on
Windows I get an IOException that a file could not be deleted. On Linux and
Mac same code works well.
I'm creating a temporary director using Java 7
Files.createTempDirectory("zookeeper-")
resulting in directory similar to the following:
C:\Users\Foo\AppData\Local\Temp\zookeeper-4563523978878660799\
Then ZooKeeper is configured to use this as data directory.
To delete it I'm using FileUtils.deleteDirectory from commons-io (2.4)
It walks the directory tree cleaning it up. It fails deleting log file
C:\Users\Foo\AppData\Local\Temp\zookeeper-4563523978878660799\version-2\log.1
Is there something else I have to call to make sure
ZooKeeperServer/ServerCnxnFactory is stopped and released all locks?
If not, is this a known bug/feature?
Kind regards,
Stevo Slavic.