[
https://issues.apache.org/jira/browse/IGNITE-16115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17508207#comment-17508207
]
Pavel Tupitsyn commented on IGNITE-16115:
-----------------------------------------
[~amashenkov] the stack trace is:
{code}
"ForkJoinPool.commonPool-worker-13@5418" daemon prio=5 tid=0xe1 nid=NA runnable
java.lang.Thread.State: RUNNABLE
at
org.apache.ignite.internal.schema.registry.SchemaRegistryImpl.schema(SchemaRegistryImpl.java:105)
at
org.apache.ignite.internal.schema.registry.SchemaRegistryImpl.resolveMapping(SchemaRegistryImpl.java:215)
at
org.apache.ignite.internal.schema.registry.SchemaRegistryImpl.resolveInternal(SchemaRegistryImpl.java:188)
at
org.apache.ignite.internal.schema.registry.SchemaRegistryImpl.resolve(SchemaRegistryImpl.java:148)
at
org.apache.ignite.internal.table.RecordBinaryViewImpl$$Lambda$762.83299136.apply(Unknown
Source:-1)
at
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at
java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at
java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at
java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at
java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at
java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at
java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at
org.apache.ignite.internal.table.RecordBinaryViewImpl.wrap(RecordBinaryViewImpl.java:374)
at
org.apache.ignite.internal.table.RecordBinaryViewImpl$$Lambda$746.1221733526.apply(Unknown
Source:-1)
at
java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642)
at
java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at
java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:610)
at
java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
at
java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:479)
at
java.util.concurrent.ForkJoinTask.doExec$$$capture(ForkJoinTask.java:290)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:-1)
at
java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at
java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
{code}
The client seems to behave correctly. There is only 1 schema with ID=1, that is
sent with DeleteAll request.
Then the following line in *SchemaRegistryImpl#resolveMapping* is called:
*mapping = schema(rowSchema.version() + 1).columnMapping();*
There is no schema with ID=2, so there is an exception.
> Implement getNullable and getOrDefault operations.
> --------------------------------------------------
>
> Key: IGNITE-16115
> URL: https://issues.apache.org/jira/browse/IGNITE-16115
> Project: Ignite
> Issue Type: Improvement
> Reporter: Andrey Mashenkov
> Assignee: Andrey Mashenkov
> Priority: Major
> Labels: ignite-3
> Fix For: 3.0.0-alpha5
>
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> It is allowed to map an object to a single nullable column, which makes
> 'null' values legal in the KeyValue view.
> Once the 'null' value is possible there is no way to distinguish, if there is
> no row in a table for the given key, or the row exists and the mapped column
> contains the 'null' value.
> Let's introduce {{NullableValue}} class-wrapper for a value and implement
> {{{}getNullable(){}}}, and {{getOrDefault()}} + bulk methods.
> {{getNullable()}} is useful for cases, when it's not possible to use a
> "default", but creates an additional wrapper.
> Also, the KeyValueView.get(key) method behavior should be changed:
> * return {{null}} if the table has no row for the key.
> * return a non-null value for the key.
> * fail with a suggestion to use a getNullable, if a {{null}} value returned
> for the key to avoid ambiguity.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)