Repository navigation
NHyDB 0.28.0
Pre-release
Pre-release
NHyDB 0.28.0
Databases created with NHyDB 0.27.1 or earlier do not open in 0.28.0
(see R013 below). Export the data with 0.27.1 and re-import it with 0.28.0.
The complete list of changes, including new functions and performance
improvements, is in CHANGELOG.md.
Identifiers below are stable references for reported problems.
Fixed
| ID | Problem in 0.27.1 | Status |
|---|---|---|
| F001 | repair_file could cut intact committed blocks that followed a damaged block. |
Fixed |
| F002, N2 | A damaged newest superblock could lead to committed data being cut on open. | Fixed |
| F003 | Realm and u numbers above a fixed bit length could not be read back after reopening. |
Fixed |
| F004 | Shape, layout or index IDs above 2^63−1 could make a database unopenable. | Fixed |
| F005 | create(overwrite=True) could delete a layout plan or key file belonging to another database. |
Fixed |
| F006 | A failed create(overwrite=True) could destroy the existing database. |
Fixed |
| F007 | With relative paths and a later change of the working directory, the layout plan could be written to the wrong directory and the database became unopenable. | Fixed |
| F008 | create_shape/create_realm with an existing ID replaced the definition and made existing data unreadable. |
Fixed – see API behavior |
| F009 | Indexed queries returned wrong results for sparse u above 2^32. |
Fixed |
| F010 | Indexes returned wrong records in realms that mix CLASSIC with other layouts. | Fixed |
| F011 | Damaged index blocks were used without a checksum check and could give wrong results. | Fixed |
| F012 | There was no write-free way to open a database; diagnostics (CLI verify, stats, health) changed the file. |
Fixed |
| F013 | Backups made by compact_file/repair_file could not be restored after two schema commits (layout plan not included). |
Fixed |
| F014 | varuint/varint values above about 16 390 bits were written but the cell could no longer be read. |
Fixed |
| F015 | Deeply nested query expressions could crash the process. | Fixed |
| F016 | Deeply nested SQL expressions could crash the process. | Fixed |
| F017 | Deeply nested MATH expressions could crash the process. | Fixed |
| F018 | read_numpy with a huge count could abort the process. |
Fixed |
| F019 | repair_file kept uncommitted blocks as committed data. |
Fixed |
| F020 | A file truncated at a block boundary was reported as clean. | Fixed |
| F021, G3-03 | Damaged block prefixes were not checksum-checked: reads, range, select and read_numpy could silently return None, an older value or miss records. Damaged SPARSE prefixes, a DATA realm that does not match its shape, and damaged DATA u_start values without overlapping segments now raise CorruptionError. |
Fixed (remaining case: F021 under Known issues) |
| F022 | Manipulated block counts could cause a panic. | Fixed |
| F023 | Writing a large integer to a bytes field (bytes(n)) could abort the process. |
Fixed |
| F024 | A NumPy float16 column caused unbounded recursion. | Fixed |
| F025 | Indexed range queries over None, NaN or mixed values raised TypeError. |
Fixed |
| F026 | Indexed queries did not see extension fields that remain after delete(realm, u). |
Fixed |
| F027 | NHySQL FROM <layout> returned records of other layouts. |
Fixed |
| F028 | Behavior after close() was inconsistent: some reads still returned cached data. |
Fixed |
| F029 | MATH constant folding ignored math_max_intermediate_bits. |
Fixed |
| F030 | Cells of a MATH layout could become unreachable after reopening with a different bit limit. | Fixed |
| F031 | MATH inputs did not convert floats and numeric strings exactly like Python int(). |
Fixed |
| F032 | Opening via a path that differs in case or Unicode normalization raised a false CorruptionError. |
Fixed |
| F033 | NumPy columns were silently reinterpreted (2-D arrays, str, bool, NaN, memoryview); read_numpy dtypes depended on the data. |
Fixed |
| F034 | CLI errors produced tracebacks and no defined exit codes. | Fixed |
| F035 | lock=/lock_timeout_ms= replaced the whole lock configuration. |
Fixed |
| F036 | A failed compact_file left files behind that blocked a retry. |
Fixed |
| F037 | Files smaller than the superblock area were reported with negative values. | Fixed |
| F038 | Damaged record data raised IndexError instead of CorruptionError. |
Fixed |
| F039 | Some writes changed values silently (non-finite float results, bytes into utf8, unknown dict keys). |
Fixed – see API behavior |
| F041 | kernel.dec_value with an out-of-range position could panic. |
Fixed |
| F042 | The MATH lexer differed from Python for some literals and comment lines. | Fixed |
| F043 | MATH identifiers that are not NFC-normalized were accepted. | Fixed |
| F044 | kernel.intersect_sorted_ints handled duplicate values differently from the reference. |
Fixed |
| F045 | == NaN matched through an index but not through a scan. |
Fixed |
| F046 | Query output differed with and without an index in some return modes. | Fixed |
| F047 | delete_cell on a missing cell reported success. |
Fixed – see API behavior |
| F048, G2-5 | I/O errors were not raised as the matching OSError subclass or named the wrong file. |
Fixed |
| F049 | The context manager could lose the original exception and keep the lock after a failed commit. | Fixed |
| F050 | The lock file followed symbolic links (Unix). | Fixed |
| F051 | Empty, identical or directory paths and very small db_max_size_bytes were accepted. |
Fixed |
| F054 | verify() stopped at the first damage; a stale index was reported as an error. |
Fixed |
| F055 | get_value did not accept column names. |
Fixed |
| F056 | Several input checks were missing (BM25 k1, @record_n, search(limit=), lone surrogates in stored JSON). |
Fixed |
| N3 | Backups made within the same second failed with FileExistsError. |
Fixed |
| D006 | MathError, LayoutError and QueryError did not derive from NHyDBError; damaged column offset tables could panic. |
Fixed |
| R001 | On macOS, durability fsync did not order the data writes before the superblock write (risk on power loss). |
Fixed |
| R002 | A failed fsync or superblock write during commit left the handle usable and could report a commit as durable. | Fixed |
| R004 | Opening with lock=False could cut another writer's uncommitted tail. |
Fixed |
| R005 | Windows: replacing the layout plan or a compacted/restored database failed while another process held the file and was not flushed afterwards. | Fixed |
| R007 | repair_file wrote both superblocks with generation 1 and without a sync in between. |
Fixed |
| R008 | close() after a failed commit did not release file handle and lock. |
Fixed |
| R009 | Values nested very deeply could overflow the stack. | Fixed |
| R010 | Decompression of index data had no size limit. | Fixed |
| R011 | Sparse record groups above 4 GiB could have their length truncated. | Fixed |
| R012 | The key object was not wiped from memory on release and could appear in debug output; a key file readable by others was accepted without warning. | Fixed (remaining part: G2-7 under Known issues) |
| R014 | repair_file inspected the file before taking the lock. |
Fixed |
| R016 | Internal decode caches could grow without limit during long sessions. | Fixed |
| G2-1 | With lock=False, closing a handle without changes could hide another writer's acknowledged commit. |
Fixed |
| G2-6 | A failed create left its lock file behind. |
Fixed |
Known issues
| ID | Problem | Status |
|---|---|---|
| G2-7 | Internal states of the HMAC/AES-GCM implementations and temporary buffers holding key material are not guaranteed to be overwritten in process memory. The .nhydb data file is not encrypted. |
Deferred |
| F021 | Remaining case: with overlapping DATA segments, a damaged u_start in a DATA block prefix may only be detected when that block is loaded or by verify(deep=True). |
Open |
| G3-05 | Open handles assume blocks are never changed in place. If another tool modifies an already checked block, an open handle may not detect it; reopening checks again. | Documented limitation |
| G3-07 | A cell written only as None, without a dense record, is counted by COUNT(*) and Q.all(), while get() returns None and range() skips it. |
Open |
| R006 | Windows: the .layout.key file inherits the permissions of its directory; NHyDB sets no owner-only ACL. |
Documented limitation |
| D004 | The [cache] keys vindex_max_marks and vindex_max_indexes are accepted but not used. |
Open |
| F057 | A utf8 field of a dense record stores any value as text via str(): None written with put/put_dense_batch is read back as 'None', not as a null value (put_cell stores a real null). |
Open |
| F058 | put_record(layout_id, object_id, get_record(...)) raises SchemaError (unknown column _realm); the metadata keys of a get_record result must be removed before writing it back. |
Open |
API behavior
| ID | Behavior | Status |
|---|---|---|
| R013 | The schema digest is keyed (HMAC-SHA256). Databases created with 0.27.1 or earlier fail to open with CorruptionError naming 0.27.1; there is no migration. |
Changed (file format) |
| – | delete(realm, u) hides the dense record only; single cells and extension fields written for that u stay visible. delete_record(layout_id, object_id) removes a record completely; delete_cell/delete_point remove single cells. |
Intended |
| F039 | Unknown keys in dict rows raise SchemaError, bytes for a utf8 field raise TypeError, non-finite float results raise ValueError. Records returned by get() can be written back with put(). |
Changed |
| F040 | Non-integral numbers as coordinates, realm, lane or IDs raise TypeError; integral values such as 3.0 are accepted. |
Changed |
| F008 | create_realm, create_shape and create_index with an ID that is already in use raise SchemaError instead of replacing the definition. |
Changed |
| F047 | delete_cell returns True/False and writes nothing for an empty cell. |
Changed |
| F052 | from nhydb import * no longer exports open; use nhydb.open(...). |
Changed |
| D001 | The open parameter strict is removed (it had no effect); use readonly=True. |
Changed |
| D008 | set_math_max_intermediate_bits affects standalone MATH expressions only; database operations use the configured limit, frozen per MATH layout. |
Intended |
| R003 | Read-only queries may share one NHyDB object between threads; a write on an object that another thread is using raises RuntimeError without changing data. |
Intended |
| F053 | In a CUSTOM layout plugin, occupied_addresses cannot call back into the same database during delete_record (RuntimeError); it must compute the addresses from its arguments. |
Documented limitation |
| F056 | Single reads with negative coordinates return None; NumPy batch paths raise ValueError. |
Intended |