[ 
https://issues.apache.org/jira/browse/IGNITE-22019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Evgeny Stanilovsky updated IGNITE-22019:
----------------------------------------
    Fix Version/s: 3.2
                       (was: 3.1)

> Different behavior of get() and getAll() wrt key marshalling
> ------------------------------------------------------------
>
>                 Key: IGNITE-22019
>                 URL: https://issues.apache.org/jira/browse/IGNITE-22019
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Roman Puchkovskiy
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.2
>
>
> Create a table: CREATE TABLE test (id int, val varchar, PRIMARY KEY USING 
> HASH (id))
> The add a column 'added int'.
> Then
> private static class Value {
>     private @Nullable String val;
>     private Value()
>     {
>     }
>     private Value(@Nullable String val)
>     {
>         this.val = val;
>     }
> }
> KeyValueView<Integer, Value> view = 
> CLUSTER.aliveNode().tables().table(TABLE_NAME).keyValueView(Integer.class, 
> Value.class);
> Doing view.get(null, 10) throws the following exception:
>  
> Caused by: java.lang.IllegalArgumentException: No mapped object field found 
> for column 'ADDED'
>     at 
> org.apache.ignite.internal.marshaller.Marshaller.pojoMarshaller(Marshaller.java:133)
>     at 
> org.apache.ignite.internal.marshaller.Marshaller.createMarshaller(Marshaller.java:64)
>     at 
> org.apache.ignite.internal.marshaller.ReflectionMarshallersProvider.lambda$getValuesMarshaller$1(ReflectionMarshallersProvider.java:78)
>     at 
> com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$13(BoundedLocalCache.java:2457)
>     at 
> java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1947)
>     at 
> com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2455)
>     at 
> com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2438)
>     at 
> com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:107)
>     at 
> com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManualCache.java:62)
>     at 
> org.apache.ignite.internal.marshaller.ReflectionMarshallersProvider$MarshallerCache.getOrAdd(ReflectionMarshallersProvider.java:127)
>     at 
> org.apache.ignite.internal.marshaller.ReflectionMarshallersProvider.getValuesMarshaller(ReflectionMarshallersProvider.java:77)
>     at 
> org.apache.ignite.internal.schema.marshaller.reflection.KvMarshallerImpl.<init>(KvMarshallerImpl.java:77)
>     at 
> org.apache.ignite.internal.table.KeyValueViewImpl.lambda$new$0(KeyValueViewImpl.java:107)
>     at 
> org.apache.ignite.internal.table.KeyValueViewImpl.marshaller(KeyValueViewImpl.java:484)
>     at 
> org.apache.ignite.internal.table.KeyValueViewImpl.marshal(KeyValueViewImpl.java:498)
>     at 
> org.apache.ignite.internal.table.KeyValueViewImpl.lambda$getAsync$2(KeyValueViewImpl.java:122)
>     at 
> org.apache.ignite.internal.table.AbstractTableView.lambda$withSchemaSync$1(AbstractTableView.java:162)
>     at 
> java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1106)
>     at 
> java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2235)
>     at 
> org.apache.ignite.internal.table.AbstractTableView.withSchemaSync(AbstractTableView.java:162)
>     at 
> org.apache.ignite.internal.table.AbstractTableView.lambda$withSchemaSync$0(AbstractTableView.java:171)
>  
> But doing view.getAll(null, List.of(10, 20)) does not throw anything, the 
> operation gets successfully executed.
>  
> It seems that both operations must either throw similar/same exceptions, or 
> don't throw anything in this situation.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to