> Even though I get the message, it DOES insert the row > This does not happen when I connect to Ignite running on my local machine, only when I connect to one that is running on the cloud
Looks a lot like the query is being executed twice, the first one inserts, the second one fails. Could that be caused by automated retries in the cloud environment? Load balancer misconfig? On Sat, Jun 22, 2024 at 11:02 AM Darius Cooper <dariuscoo...@gmail.com> wrote: > I'm connecting to Ignite via JDBC 10800, and trying to INSERT a row into a > table, that has three columns. > > - THE_KEY > - MY_OTHER_ID > - SOME_DATA > > If I try to insert a second record with the same value for THE_KEY, I get > a regular SQL error telling me I'm trying to insert a duplicate. So far so > good. > > But, when I start with an *empty* table, and do this: > > INSERT INTO MY_TABLE (THE_KEY, MY_OTHER_ID, SOME_DATA) > SELECT ?, ?, ? > WHERE NOT EXISTS (SELECT 1 from MY_TABLE WHERE MY_OTHER_ID = ?) > > I get an error that says: > > OperationError: 50000: Failed to INSERT some keys because they are already in > cache [keys=[123]] > > Some additional facts: > > - Even though I get the message, it DOES insert the row > - This does not happen when I connect to Ignite running on my local > machine, only when I connect to one that is running on the cloud > > Any clues to what might be going on here? Thanks! >