TileDB icon indicating copy to clipboard operation
TileDB copied to clipboard

Tiledb using NFS

Open CMCDragonkai opened this issue 5 years ago • 5 comments

What are the implications of using TileDB on NFS? What would happen if 2 tiledb instances were using the same underlying directory?

CMCDragonkai avatar Aug 27 '19 03:08 CMCDragonkai

Here is what could happen:

  • If the two tiledb processes are both reading, both writing, or one reading and one writing, then there is no issue (no locking is used). However, please note that TileDB follows the eventual consistency model.
  • If one tiledb process is performing consolidation while the other is reading, then there may be issues. This is because tiledb uses filelocks to exclusively lock the array in one (brief) stage of consolidation, namely when the old fragments are deleted. NFS does not support filelocking. If the other process is reading the fragments being deleted, issues will probably occur.

stavrospapadopoulos avatar Aug 27 '19 14:08 stavrospapadopoulos

@stavrospapadopoulos this is not correct:

  • If one tiledb process is performing consolidation while the other is reading, then there may be issues. This is because tiledb uses filelocks to exclusively lock the array in one (brief) stage of consolidation, namely when the old fragments are deleted. NFS does not support filelocking. If the other process is reading the fragments being deleted, issues will probably occur.

NFS does support file locking, only flock is not supported. fcntl should work: http://nfs.sourceforge.net/ https://linux.die.net/man/2/flock

Hoeze avatar Sep 05 '19 16:09 Hoeze

@Hoeze thanks for the clarification. We are using fcntl so the file locking may work properly on NFS. In that case, there would not be any issue with running two tiledb processes simultaneously. We have not experimented with NFS yet, but if any issue comes up we will be happy to investigate.

stavrospapadopoulos avatar Sep 05 '19 16:09 stavrospapadopoulos

fyi, we very successfully run TileDB on both NFS and CephFS :)

Hoeze avatar Jan 21 '21 11:01 Hoeze

Thanks @Hoeze. @CMCDragonkai is it ok to close this issue?

stavrospapadopoulos avatar Jan 21 '21 12:01 stavrospapadopoulos