netcdf-c/libdispatch
Dennis Heimbigner df3636b959 Mitigate S3 test interference + Unlimited Dimensions in NCZarr
This PR started as an attempt to add unlimited dimensions to NCZarr.
It did that, but this exposed significant problems with test interference.
So this PR is mostly about fixing -- well mitigating anyway -- test
interference.

The problem of test interference is now documented in the document docs/internal.md.
The solutions implemented here are also describe in that document.
The solution is somewhat fragile but multiple cleanup mechanisms
are provided. Note that this feature requires that the
AWS command line utility must be installed.

## Unlimited Dimensions.
The existing NCZarr extensions to Zarr are modified to support unlimited dimensions.
NCzarr extends the Zarr meta-data for the ".zgroup" object to include netcdf-4 model extensions. This information is stored in ".zgroup" as dictionary named "_nczarr_group".
Inside "_nczarr_group", there is a key named "dims" that stores information about netcdf-4 named dimensions. The value of "dims" is a dictionary whose keys are the named dimensions. The value associated with each dimension name has one of two forms
Form 1 is a special case of form 2, and is kept for backward compatibility. Whenever a new file is written, it uses format 1 if possible, otherwise format 2.
* Form 1: An integer representing the size of the dimension, which is used for simple named dimensions.
* Form 2: A dictionary with the following keys and values"
   - "size" with an integer value representing the (current) size of the dimension.
   - "unlimited" with a value of either "1" or "0" to indicate if this dimension is an unlimited dimension.

For Unlimited dimensions, the size is initially zero, and as variables extend the length of that dimension, the size value for the dimension increases.
That dimension size is shared by all arrays referencing that dimension, so if one array extends an unlimited dimension, it is implicitly extended for all other arrays that reference that dimension.
This is the standard semantics for unlimited dimensions.

Adding unlimited dimensions required a number of other changes to the NCZarr code-base. These included the following.
* Did a partial refactor of the slice handling code in zwalk.c to clean it up.
* Added a number of tests for unlimited dimensions derived from the same test in nc_test4.
* Added several NCZarr specific unlimited tests; more are needed.
* Add test of endianness.

## Misc. Other Changes
* Modify libdispatch/ncs3sdk_aws.cpp to optionally support use of the
   AWS Transfer Utility mechanism. This is controlled by the
   ```#define TRANSFER```` command in that file. It defaults to being disabled.
* Parameterize both the standard Unidata S3 bucket (S3TESTBUCKET) and the netcdf-c test data prefix (S3TESTSUBTREE).
* Fixed an obscure memory leak in ncdump.
* Removed some obsolete unit testing code and test cases.
* Uncovered a bug in the netcdf-c handling of big-endian floats and doubles. Have not fixed yet. See tst_h5_endians.c.
* Renamed some nczarr_tests testcases to avoid name conflicts with nc_test4.
* Modify the semantics of zmap\#ncsmap_write to only allow total rewrite of objects.
* Modify the semantics of zodom to properly handle stride > 1.
* Add a truncate operation to the libnczarr zmap code.
2023-09-26 16:56:48 -06:00
..
awsincludes.h Merge pull request #2689 from mathstuf/awsinclude-noexec 2023-06-09 15:17:06 -06:00
CMakeLists.txt Improve performance of the nc_reclaim_data and nc_copy_data functions. 2023-05-20 17:11:25 -06:00
datt.c This PR adds EXPERIMENTAL support for accessing data in the 2020-06-28 18:02:47 -06:00
dattget.c fixed more doxygen warnings 2022-05-29 08:43:56 +03:00
dattinq.c more doxygen warning fixes 2022-05-03 12:54:14 -06:00
dattput.c
dauth.c ## Addendum [5/9/23] 2023-05-09 21:13:49 -06:00
daux.c Improve performance of the nc_reclaim_data and nc_copy_data functions. 2023-05-20 17:11:25 -06:00
dcompound.c
dcopy.c Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
dcrc32.c Improve UTF8 Support On Windows 2022-02-08 20:53:30 -07:00
dcrc32.h Provide a Number of fixes/improvements to NCZarr 2020-11-19 17:01:04 -07:00
dcrc64.c Make use of clock_gettime be conditional. 2020-12-06 18:19:53 -07:00
ddim.c
ddispatch.c Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
defcheck.c
denum.c Support MSYS2/Mingw platform 2021-12-23 22:18:56 -07:00
derror.c Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
dfile.c update against main 2023-01-28 13:45:35 -07:00
dfilter.c Mitigate S3 test interference + Unlimited Dimensions in NCZarr 2023-09-26 16:56:48 -06:00
dfilterx.c Add filter support to NCZarr 2021-09-02 17:04:26 -06:00
dgroup.c
dhttp.c Mitigate S3 test interference + Unlimited Dimensions in NCZarr 2023-09-26 16:56:48 -06:00
dinfermodel.c Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
dinstance_intern.c Improve performance of the nc_reclaim_data and nc_copy_data functions. 2023-05-20 17:11:25 -06:00
dinstance.c Improve performance of the nc_reclaim_data and nc_copy_data functions. 2023-05-20 17:11:25 -06:00
dinternal.c
dmissing.c Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
dnotnc3.c
dnotnc4.c Enhance/Fix filter support 2022-03-14 12:39:37 -06:00
doffsets.c Fix various problem around VLEN's 2022-01-08 18:30:00 -07:00
dopaque.c
dparallel.c documentation improvements for nc_var_par_access() 2020-03-02 16:36:56 -07:00
dpathmgr.c Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
drc.c Mitigate S3 test interference + Unlimited Dimensions in NCZarr 2023-09-26 16:56:48 -06:00
dreadonly.c
dreg.c BLD: Get netCDF4 build working on Windows. 2022-10-12 10:56:17 -04:00
ds3util.c Mitigate S3 test interference + Unlimited Dimensions in NCZarr 2023-09-26 16:56:48 -06:00
dstring.c Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
dtype.c
durlmodel.c Prepare for the path management code 2020-10-13 19:12:15 -06:00
dutf8.c
dutil.c update 2022-11-27 14:14:23 -07:00
dv2i.c Change in support of https://github.com/Unidata/netcdf-c/issues/2599 2023-02-01 15:27:02 -07:00
dvar.c Improve performance of the nc_reclaim_data and nc_copy_data functions. 2023-05-20 17:11:25 -06:00
dvarget.c removed non-relaxed coord bounds from test code 2019-11-26 06:20:34 -07:00
dvarinq.c First draft of Granular BitGroom feature for netcdf-c 2021-10-20 16:00:32 -07:00
dvarput.c
dvlen.c Improve performance of the nc_reclaim_data and nc_copy_data functions. 2023-05-20 17:11:25 -06:00
ezxml_extra.c Significantly Improve Amazon S3 Cloud Storage Support 2021-09-27 18:36:33 -06:00
json.c
Makefile.am Improve performance of the nc_reclaim_data and nc_copy_data functions. 2023-05-20 17:11:25 -06:00
nc.c Dangling undefined references to nulldup. These should be unified in a header, but that is a separate issue to open/resolve. For now, resolving these as part of getting mingw/msys2-based github actions working. 2022-01-24 13:48:41 -07:00
ncbytes.c segv1 2023-04-27 15:12:26 -06:00
nccurl_hmac.c Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
nccurl_hmac.h Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
nccurl_setup.h Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
nccurl_sha256.c Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
nccurl_sha256.h Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
ncexhash.c Mitigate S3 test interference + Unlimited Dimensions in NCZarr 2023-09-26 16:56:48 -06:00
nch5s3comms.c ## Addendum [5/9/23] 2023-05-09 21:13:49 -06:00
nch5s3comms.h ## Addendum [5/9/23] 2023-05-09 21:13:49 -06:00
nchashmap.c change to trigger CI 2022-04-27 09:52:00 -06:00
ncjson.c Mitigate S3 test interference + Unlimited Dimensions in NCZarr 2023-09-26 16:56:48 -06:00
nclist.c Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
nclistmgr.c
nclog.c Mitigate S3 test interference + Unlimited Dimensions in NCZarr 2023-09-26 16:56:48 -06:00
ncrandom.c Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
ncs3sdk_aws.cpp Mitigate S3 test interference + Unlimited Dimensions in NCZarr 2023-09-26 16:56:48 -06:00
ncs3sdk_h5.c Mitigate S3 test interference + Unlimited Dimensions in NCZarr 2023-09-26 16:56:48 -06:00
ncsettings.hdr
nctime.c Fix for :60 seconds in ncdump 2021-01-26 10:24:43 +02:00
ncuri.c Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
ncutil.h ## Addendum [5/9/23] 2023-05-09 21:13:49 -06:00
ncxcache.c Mitigate S3 test interference + Unlimited Dimensions in NCZarr 2023-09-26 16:56:48 -06:00
netcdf.m4
stubdef.c
u8.c
u8.h
utf8proc_data.c
utf8proc.c
utf8proc.h
XGetopt.c "Simplify" XGetopt usage 2023-04-09 13:10:41 -06:00