SWMR mode - but seems I can create groups/datasets?

Hi

I’m new to HDF5 and exploring how we can use this technology in our situation.

I’m using the C library in a C# application and creating test platforms to try out various features. SWMR mode is of particular interest as ideally we want to record streams of data, and simultaneously show a running display of slices of data. If I can do this using an H5 file (rather than lots of memory or a SQL DB) that would be great.

SWMR seems to be working fine, although I read that you can’t create new groups or datasets while the file is in this mode. So I tested that and surprisingly, I can! If this is legit, then that would be even more helpful.

But what have I missed?

I read that there is a new ‘VFD SWMR’ on the cards, have I ended up with that?

Any help appreciated :slight_smile:

Creating new groups and datasets w/ SWMR is only working on accident. Eventually, your reader will come across incompletely flushed metadata and either crash or emit errors when it tries to open the new objects.

VFD SWMR is a work in progress and has not been merged to the main development trunk for release yet. It will not be in 1.14.0 but may make it into 1.14.1. You can test the branch here:

1 Like

Thank you. Understood. I was expecting the create to fail and return an error when in SWMR mode, so it was a surprise that it worked.

1 Like

I don’t recall why the decision was made to not raise errors in cases like this, but it’s something I’ve wanted to revisit for a while.

1 Like

I’m sure it’s not the most important thing but would be useful. I wasn’t sure how to check that I’d definitely switched into SWMR - in the end I used a separate python script that did give a clear error saying when it wasn’t.