Cover seeking with inclusive, exclusive and partial start keys, end keys, empty
and infinite ranges, exhausting a range with next(), deepCopy, and the interrupt
flag: seek() checks it on every call, while next() checks it on every 100th
call starting with the first, counting the calls seek() makes to skip an
exclusive start key. Adds the junit-jupiter test dependency to the module.
Accumulo's SortedMapIterator throws its non-public IterationInterruptedException
when the interrupt flag is set, not an IOException. Add a DataWave
IterationInterruptedException, unchecked like Accumulo's, so callers can catch
the interrupt and handle it, and throw it from next() and seek().
Accumulo's SortedMapIterator, like NativeMap, only checks the interrupt flag on
every 100th call to next() because checking it on every call is costly. Restore
that, and make the interrupt flag and the new call counter private.
Seek to the tail map of the start key, then call next() while the top key is
before the range start, as Accumulo's SortedMapIterator does. Range.beforeStartKey
handles exclusive start keys, so the separate equality check goes away, and an
infinite start no longer skips an entry equal to new Key() when the range marks
its start as exclusive.
Updated with integration for the Accumulo 4 work (#3766). Resolved conflicts in pom.xml, AccumuloTableIterableTest, DocumentDataIteratorTest and ParentQueryIteratorTest; kept integration's released in-memory-accumulo 4.0.6 pin and its JUnit 5 test imports, with the DataWave SortedMapIterator import.
Field name, event id and value generators for the test framework. These
depend only on the util package, so they carry no metadata coupling and
can be reviewed on their own.
---------
Co-authored-by: Claude Opus 5 <[email protected]>
toString() built its mini-maps into instance fields, but the metadata
helper cache hands the same TypeMetadata to every concurrent query with
matching auths, so the first serializations after a cache refresh raced
on unsynchronized TreeMaps. They are now built locally and published
once.
Where type metadata is missing or malformed, fail instead of degrading:
folding away an absent ingest type, or parsing a corrupt mini-map, would
normalize values against the wrong types and silently drop valid
results. An empty instance also serialized to an unterminated string the
tablet servers could not parse.
Planning waits could only iterate on a null result and then spun on a
completed future forever, so they now fail fast, and the iterator
setting poll blocks on its future rather than busy-waiting on isDone().
---------
Co-authored-by: Claude Opus 5 <[email protected]>
Make the following changes to improve the thread-safety of
QueryUncaughtExceptionHandler, and add test coverage.
- Generate a sequence for each call to uncaughtException() to help
ensure the first call with a non-null Throwable wins the race,
regardless of which thread's CAS operation completes first.
- In uncaughtException(), atomically update the sequence number, thread,
and throwable at the same time.
- Use an efficient, thread-safe collection for storing and retrieving
messages.
---------
Co-authored-by: Moriarty <[email protected]>
First half of the framework's foundation: the new
core/datawave-core-test module plus the util package it is built on.
Split from the generators so each half stays independently reviewable.
---------
Co-authored-by: Claude Opus 5 <[email protected]>
The test compiled roughly a quarter million patterns from an unseeded
source, so a failure could not be reproduced. A fixed seed, overridable
with datawave.test.seed, now covers ten thousand cases
deterministically.
Co-authored-by: Claude Opus 5 <[email protected]>
A tablet server returns whatever the topmost user iterator emits;
nothing between the stack and the client tests keys against the range.
Filtering here hid iterators that emit outside their seek range, and
disagreed with InMemoryBatchScanner, which never filtered.
Co-authored-by: Claude Opus 5 <[email protected]>
- Implements FederatedAnnotationReader that can read from multiple
sources and reconcile results.
- Removes unfinished write implementations from AnnotationManagerBean
due to new write path design via microservices.
- Removes separate AnnotationSourceReader/Writer interfaces and moved
source specific methods to AnnotationReader/Writer to eliminate
complexity.
- Added truthmark cases to AnnotationManagerBeanFunctionalTest.
- Added assertion to compare two annotation lists to ensure equivalence.
Co-authored-by: Laura Schanno <[email protected]>