Create one dataset creation property list and one file dataspace and
share them across all datasets/iterations. Extract common code into
state_destroy().
Extract common subexpressions into `oent` and `nent` for brevity.
Assert index entries are in sorted order earlier in the loop over
old and new indices.
When looping over the remaining new index entries, just do
`entries_added++` to match the other loops.
In the final log entry in H5F_vfd_swmr_reader_end_of_tick(), mention
whether the call will exit with success or failure.
Make H5Drefresh() copy non-persistent properties---e.g., dataset access
property lists---from the closed dataset to the reopened dataset. Now my
chunk-cache settings appear to survive H5Drefresh() calls.
Create a dataset access property list (dapl) that disables the chunk cache and
apply it individually to each dataset instead of setting the chunk-cache
parameters on the file. Alas, it didn't make any difference, but I'll keep the
change.
Extract common subexpressions into `oent` and `nent` for brevity.
Assert index entries are in sorted order earlier in the loop over
old and new indices.
When looping over the remaining new index entries, just do
`entries_added++` to match the other loops.
In the final log entry in H5F_vfd_swmr_reader_end_of_tick(), mention
whether the call will exit with success or failure.
Make H5Drefresh() copy non-persistent properties---e.g., dataset access
property lists---from the closed dataset to the reopened dataset. Now my
chunk-cache settings appear to survive H5Drefresh() calls.
Create a dataset access property list (dapl) that disables the chunk cache and
apply it individually to each dataset instead of setting the chunk-cache
parameters on the file. Alas, it didn't make any difference, but I'll keep the
change.
On each SWMR VFD open for reading, keep a histogram for the number of
ticks elapsed during API calls. Write the histogram to the swmr_stats
log outlet when the SWMR VFD closes.
Rename H5F__vfd_swmr_writer__create_index to H5F__vfd_swmr_create_index.
H5F_vfd_swmr_reader_end_of_tick: delete superfluous assertions and
extract a com mon subexpression into a H5FD_t * variable.
Carry on with HGOTO_ERROR() cleanup. Delete superfluous parentheses to
reduce visual clutter. Delete superfluous casts. Delete out-of-date
comment: the index size is not fixed any longer.
Delete superfluous casts. Remove superfluous backslashes and
statement-ify, changing
HGOTO_ERROR(..., \
)
to
HGOTO_ERROR(...,
);
Remove blank lines between if-clause and HGOTO_ERROR. Add some curly
braces to if-statements where that clarifies things.
NFCI.
Avoid leaving a v1 B-tree used as a chunk index in a bad state
that makes assertions fail.
Add an optional `close` method to the `H5D_chunk_ops_t`, and use that to
release "holds" on metadata cache (MDC) entries.
For extensible arrays and v2 B-trees, use the existing `dest`(roy)
method to implement `close`. For v1 B-trees and other chunk indices,
don't provide `close`: we cannot safely close the v1 B-tree index, and
the other indices don't have a meaningful presence in the MDC.
Revert my ...
Always restart H5C_evict_or_refresh_all_entries_in_page()'s scan of
the entries in a hash bucket after evicting tagged entries. Evicting
tagged entries can can affect both entries before and after the current
entry in the bucket's linked list, so we cannot be sure that either
`entry_ptr` or `follow_ptr` is valid.
This stops the assertion (entry_ptr->page != page) ||
(entry_ptr->refreshed_in_tick == tick) from failing in the test
`testvfdswmr.sh many_small`.
Extract a subroutine that closes chunk indices,
H5D__chunk_index_close(), and call it in H5D__chunk_read() after reading
a chunked dataset. In this way, indices based on extensible arrays and
v2 B-trees do not leave pinned/tagged entries in the metadata cache that
we cannot evict/refresh when we load changes from the shadow file.
Make some changes to the v1 B-tree code that set the pointer to the
closed B-tree to NULL and, further, tolerate a NULL pointer where
previously that was impossible.
Only remove shadow-index entries in H5PB__evict_entry() if we're a
VFD SWMR writer, so that the reader does not lose track of the real
shadow-index content.
Be concise and more obviously correct, and knock many line widths
below than 80 columns: use the malloc idiom,
```
type *p;
p = malloc(sizeof(*p));
```
instead of
```
type *p;
p = (type *)malloc(sizeof(type));
```
Make a similar change to some `memset` calls. NFCI.
If we're processing the EOT queue when we *enter* a function, use
HGOTO_ERROR() instead of HDONE_ERROR() so that we jump to the `done`
label right away. This ought to fix the problem Vailin was seeing,
where the library left H5F_vfd_swmr_reader_end_of_tick() prematurely for
seemingly no reason.
Perform a test where a writer creates 10,000 groups while a reader waits for
each to appear.
Add but do not yet perform tests on many small extensible datasets and a few
big extensible datasets. Vailin is working on a bug that causes both tests to
fail virtually always.