Releases: eric9n/Kun-peng
v0.7.12
v0.7.11
v0.7.10
This release fixes critical bugs in the FastaReader and BufferFastaReader that caused incorrect sequence parsing and data loss. Both readers now use a new, robust parsing engine that correctly handles multi-line sequences, comments, and whitespace. FASTA file reading is now stable, accurate, and reliable.
v0.7.8
-
This release introduces a major database construction workflow improvement with the new add_library command, allowing users to safely add local FASTA files while automatically preventing duplicates.
-
The database build commands have been refactored into build (for the full process) and build_db (for building hashes only) to make their intent clearer. Additionally, build_db commands now support a new -c flag, allowing advanced users to specify an exact hash table capacity to skip the time-consuming estimation step.
v0.7.7
fix(build): Resolve critical data loss and UB in parallel data processing
This commit addresses two critical, independent bugs that together caused
non-deterministic data loss and corrupted data reads during the
database build process.
1. Fixed Critical Data Loss in set_page_cell (The Logic Bug)
- Problem: The
set_page_cellfunction had a fatal logic error in its
loop exit condition (if result.is_ok() || idx == first_idx). - Consequence: When
par_itercaused a key conflict (a non-matching
key in an occupied slot), theresultwasErrbutidx == first_idx
wastrue. The loop would immediatelybreak, silently discarding
the data instead of performing linear probing. This led to massive,
random data loss depending on thread race conditions. - Fix: The loop logic was rewritten to correctly
matchon the
fetch_updateresult. It now only breaks onOk(success) or after
a full circular probe, and correctly incrementsidxonErrto
perform linear probing as intended.
2. Fixed Data Corruption (UB) in read_first_block_from_file (The I/O Bug)
- Problem: The function previously allocated a
Vec<u8>(1-byte
alignment) and unsafely cast its pointer to*const u32(4-byte
alignment), causing Undefined Behavior (UB). - Consequence: This alignment mismatch resulted in non-deterministic,
corrupted data being read from the file, which was the root cause of
seeing different values (e.g.,3995202615vs2133185527) at the
same index on different runs. - Fix: Replaced the implementation to first allocate a
Vec<u32>
(guaranteeing alignment) and then usedbytemuckto safely cast to
&mut [u8]. This enables high-performance, zero-copy reads directly
into the buffer while being memory-safe.
These two fixes together ensure the database build is now correct,
deterministic, and robust against race conditions, fully resolving
the data loss and corruption issues.