You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Alex Plehanov <pl...@gmail.com> on 2022/09/01 06:43:56 UTC

Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

Once the table is recreated (or index rebuilded) the issue is fixed.
Upgrading from 2.12 to 2.13 (if all indexes having this issue are already
rebuilded on 2.12) should be fine.

ср, 31 авг. 2022 г. в 23:43, John Smith <ja...@gmail.com>:

> Ok but since I dropped and recreated the table I'm fine? It won't somehow
> throw that error again? And if I upgrade to 2.13 from 2.12 will I have the
> same issue?
>
> On Wed, Aug 31, 2022 at 3:31 PM Alex Plehanov <pl...@gmail.com>
> wrote:
>
>> John Smith,
>>
>> Thank you. This issue will be fixed in upcoming 2.14.
>>
>> ср, 31 авг. 2022 г. в 21:50, John Smith <ja...@gmail.com>:
>>
>>> Here it is... And yes I recently upgraded to 2.12 from 2.8.1
>>>
>>> create table if not exists car_code (
>>> provider_id int,
>>> car_id int,
>>> car_code varchar(16),
>>> primary key (provider_id, car_id)
>>> ) with "template=replicatedTpl, key_type=CarCodeKey, value_type=CarCode";
>>>
>>> On Wed, Aug 31, 2022 at 7:25 AM Alex Plehanov <pl...@gmail.com>
>>> wrote:
>>>
>>>> John Smith,
>>>>
>>>> Can you please show DDL for the car_code table? Does PK of this table
>>>> include provider_id or car_code columns?
>>>> I found a compatibility issue, with the same behaviour, it happens when
>>>> storage created with Ignite version before 2.11 is used with the newer
>>>> Ignite version. Have you upgraded the dev environment with existing storage
>>>> recently (before starting to get this error)?
>>>>
>>>>
>>>> чт, 4 авг. 2022 г. в 17:06, John Smith <ja...@gmail.com>:
>>>>
>>>>> Let me know if that makes any sense, because the test data is the same
>>>>> and the application code is the same. Only dropped and created the table
>>>>> again using DbEaver.
>>>>>
>>>>> On Wed, Aug 3, 2022 at 11:39 AM John Smith <ja...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi, so I dropped the table and simply recreated it. Did NOT restart
>>>>>> the application.
>>>>>>
>>>>>> Now it works fine.
>>>>>>
>>>>>> On Wed, Aug 3, 2022 at 9:58 AM John Smith <ja...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> How? The code is 100% the same between production and dev. And it's
>>>>>>> part of a bigger application.
>>>>>>>
>>>>>>> Only dev has the issue. I will drop and recreate the table if that
>>>>>>> fixes the issue then what?
>>>>>>>
>>>>>>> You are saying mismatch, it's a string period.
>>>>>>>
>>>>>>> "select car_id from car_code where provider_id = ? and car_code = ? order by car_id asc limit 1;"
>>>>>>>
>>>>>>>
>>>>>>> The first parameter is Integer and the second one is String. there's
>>>>>>> no way this can mismatch... And even if the String was a UUID it's still a
>>>>>>> string.
>>>>>>>
>>>>>>>     public JsonArray query(final String sql, final long timeoutMs,
>>>>>>> final Object... args) {
>>>>>>>         SqlFieldsQuery query = new SqlFieldsQuery(sql).setArgs(args);
>>>>>>>         query.setTimeout((int) timeoutMs, TimeUnit.MILLISECONDS);
>>>>>>>
>>>>>>>         try (QueryCursor<List<?>> cursor = cache.query(query)) {
>>>>>>>             List<JsonArray> rows = new ArrayList<>();
>>>>>>>             Iterator<List<?>> iterator = cursor.iterator();
>>>>>>>
>>>>>>>             while(iterator.hasNext()) {
>>>>>>>                 List currentRow = iterator.next();
>>>>>>>                 JsonArray row = new JsonArray();
>>>>>>>
>>>>>>>                 currentRow.forEach(o -> row.add(o));
>>>>>>>
>>>>>>>                 rows.add(row);
>>>>>>>             }
>>>>>>>
>>>>>>>             promise.tryComplete(rows);
>>>>>>>         } catch(Exception ex) {
>>>>>>>         ex.printStackTrace();
>>>>>>>         }
>>>>>>>     }
>>>>>>>
>>>>>>>     Integer providerId = 1;
>>>>>>>     String carCode = "FOO";
>>>>>>>
>>>>>>>     query("select car_id from car_code where provider_id = ? and
>>>>>>> car_code = ? order by car_id asc limit 1;", 3000, providerId, cardCode);
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Aug 3, 2022 at 6:50 AM Taras Ledkov <tl...@apache.org>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi John and Don,
>>>>>>>>
>>>>>>>> I guess the root cause in the data types mismatch between table
>>>>>>>> schema and actual data at the store or type of the query parameter.
>>>>>>>> To explore the gap, it would be very handy if you could provide a
>>>>>>>> small reproducer (standalone project or PR somewhere).
>>>>>>>>
>>>>>>>> > In my case I'm not even using UUID fields. Also the same code 2
>>>>>>>> diff environment dev vs prod doesn't cause the issue. I'm lucky enough that
>>>>>>>> it's on dev and prod is ok.
>>>>>>>> >
>>>>>>>> > But that last part might be misleading because in prod I think it
>>>>>>>> happened early on during upgrade and all I did was recreate the sql table.
>>>>>>>> >
>>>>>>>> > So before I do the same on dev... I want to see what the issue is.
>>>>>>>> >
>>>>>>>> > On Tue., Aug. 2, 2022, 6:06 p.m. , <do...@gmx.de> wrote:
>>>>>>>> >
>>>>>>>> >> I‘m only speculating but this looks very similar to the issue I
>>>>>>>> had last week and reported to the group here.
>>>>>>>> >>
>>>>>>>> >> Caused by: org.h2.message.DbException: Hexadecimal string with
>>>>>>>> odd number of characters: "5" [90003-197]
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> With best regards,
>>>>>>>> Taras Ledkov
>>>>>>>>
>>>>>>>