TileDB icon indicating copy to clipboard operation
TileDB copied to clipboard

Initialize MemFS in VFS and add example

Open bekadavis9 opened this issue 2 years ago • 3 comments

Through debug, we've discovered that the MemFS was not getting initialized in the VFS, despite being "enabled" by default. A global Context and VFS are typically used on the object so this bug was previously overlooked. This work item initializes the MemFS in the VFS and adds an example test, which also highlights the need for a global Context on MemFS.


TYPE: BUG DESC: Initialize MemFS in the VFS

bekadavis9 avatar Aug 09 '22 19:08 bekadavis9

[sc-19989]

bekadavis9 avatar Aug 09 '22 19:08 bekadavis9

This pull request has been linked to Shortcut Story #19989: memfs initialization and testing.

This is a bit confusing:

edd@rob:~/git/tiledb/examples/cpp_api(rd/memfs_error_debug)$ ./memfs 
Error: Must use process global Context on memfs.
2 3 4 6 7 8 
The MemFilesystem is associated with a single VFS instance.
edd@rob:~/git/tiledb/examples/cpp_api(rd/memfs_error_debug)$ 

So it throws on the attempt to vfs.remove_dir() the one memfs that there is, in the one context. If we disallow that, why not simply error on entry in the remove_array() (demo) function?

eddelbuettel avatar Aug 12 '22 22:08 eddelbuettel