From user-return-17228-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Mon Jan 15 09:02:04 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 81922180657 for ; Mon, 15 Jan 2018 09:02:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7200E160C31; Mon, 15 Jan 2018 08:02:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 919FC160C25 for ; Mon, 15 Jan 2018 09:02:03 +0100 (CET) Received: (qmail 43162 invoked by uid 500); 15 Jan 2018 08:02:02 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 43152 invoked by uid 99); 15 Jan 2018 08:02:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jan 2018 08:02:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 07D5118068E for ; Mon, 15 Jan 2018 08:02:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 5piB6LwNtsss for ; Mon, 15 Jan 2018 08:02:00 +0000 (UTC) Received: from mail-qt0-f175.google.com (mail-qt0-f175.google.com [209.85.216.175]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 889405FAF9 for ; Mon, 15 Jan 2018 08:02:00 +0000 (UTC) Received: by mail-qt0-f175.google.com with SMTP id i40so13175875qti.8 for ; Mon, 15 Jan 2018 00:02:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=/cOCCzhrHlS76pa2hF0WA6d74obQZGtwJ2JSJxvhzvs=; b=pDoZ9aqtxyYv+YoeyN7393VgRzv6YIbpPJW9aGsjTjdqzYE+X1cEQCVKAOgOoaur1k TpC2PqviOVA22yAzWGLywAZXZJDr7FPCogGYmtIrErPx7cPM2qg9gCt+Av1Qt5XSgg2v sYwZEfitQiS1ty0E3+r6Vbi29G02wXFkBFEt0/7yKTTdAzQhjH7DccfR4rhsKvzz8fhz iks1z0xFpea/MwmA3Gp3MrrdlEjcy+UsQeGKtn1VGibm5HQn4Lw0+1/zUic+jHWMo5mY 7+Hbzu7H2t6Ch7K4vpaJVP63/jVv/xTQe/5R3BYvDcnXw4yQymLttGVdP7KC7920wQ5j /Xyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=/cOCCzhrHlS76pa2hF0WA6d74obQZGtwJ2JSJxvhzvs=; b=Aq6Lzlnl9fXxnxQZ4XUaYQkQxIIG8GZkWCCo6Shl8IpGwu+hh+QQJ4mp7zWAApII+t 8QLJ3CZWTpeWoQsCP0Dszooabw32Nb+rEJFWnpUCyNY31QSRhQ/5mlhzxUL2LmxmDkpo RuYoxrHo0Uiiqoc9IM7iBIfUqoWopXh4H2ay5wpLCT0nZGpJNvJDAHy3QCpopPAiK3wk 37u9y78osC95AIAq57GhVP2P43fh3iRNnh6sZgUBWne3L7sca8TpZvDRgLcilkr0ohd1 3ncM9JH/rVyQQbTOi34V9wIsKRqYKROpVVSlqGexPO/aaM+1G2V3Ro8A9ZzRPyBQ1vRA JDLA== X-Gm-Message-State: AKwxytcRCW4Nr1tdQnE1xdn22scS8N9E5Dwz5gnk3hI7nQ1NJDi68ODP 1Xed/vOuXqaR80KFcSIj3/Ee5VclznwlSvz4NHv1BA== X-Google-Smtp-Source: ACJfBotcTuNmBtH41855nZeGty3hLjc0EhWoMYtDePiuNSyADL7RFG2DYyNOmST6ljQEDIfN+8two/qP0H/SbDC9Kac= X-Received: by 10.200.46.239 with SMTP id i44mr21977097qta.179.1516003319943; Mon, 15 Jan 2018 00:01:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.10.9 with HTTP; Mon, 15 Jan 2018 00:01:59 -0800 (PST) In-Reply-To: References: From: Evgenii Zhuravlev Date: Mon, 15 Jan 2018 11:01:59 +0300 Message-ID: Subject: Re: Exception Occuredjava.sql.BatchUpdateException: ORA-00001: unique constraint To: user@ignite.apache.org, rajarshi20@gmail.com Content-Type: multipart/alternative; boundary="001a113781e85d13c10562cc0704" --001a113781e85d13c10562cc0704 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, As for 9800 entries instead of 10000 - most possible that you just have a small mistake when you work with your counter and these entries were not written to the DB: if(counter=3D=3D100) Anyway, for both problems community need additional information for an investigation. It would be great if you could share your full project with all configs and code, so the community can fast reproduce your issue and help you. Evgenii 2018-01-14 10:32 GMT+03:00 Rajarshi Pain : > Hello, > > Can someone please help me on this scenario if somewhere I am making any > mistake ? > > Thanks, > Raj > > On Fri, Jan 12, 2018 at 11:57 PM, Rajarshi Pain > wrote: > >> Hi, >> >> We were doing a POC(Ignite 2.3 - oracle) to check how cache Persistence >> Store works using writeBehind, We are updating data as a batch rather th= an >> updating one by one record. >> >> though there are no duplication record but still getting "unique >> constraint" exception. >> >> We couldnt find any root cause for this not sure is any issue if this is >> a possible ignite bug as this error is coming randomly. >> >> Also in another POC we have seen that it's not inserting all the data to >> the database. >> For example we have pushed 10K but in Database we can only see 9800, >> though there is no error or exception. >> >> could you please shade some lights on these issues ? >> >> Sample Code: >> >> for(int i=3D1;i<=3D100000;i++) >> { >> frstnm=3D"test1name"+i; >> scndnm=3D"test2name"; >> p1 =3D new Person(i, frstnm, scndnm); >> cache.put((long)i, p1); >> } >> >> >> insert into PERSON (id, firstname, lastname) values (?, ?, ?) >> >> *inside write: * >> >> st.setLong(1, val.getId()); >> st.setString(2, val.getFirstName()); >> st.setString(3, val.getLastName()); >> st.addBatch(); >> if(counter=3D=3D100) >> { >> System.out.println("Counter "+ counter); >> st.executeBatch(); >> counter=3D0; >> } >> >> got exception after 11K records >> >> Exception Occuredjava.sql.BatchUpdateException: ORA-00001: unique >> constraint =E2=80=8B >> >> -- >> Regards, >> Rajarshi Pain >> > > > > -- > Regards, > Rajarshi Pain > --001a113781e85d13c10562cc0704 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

As for 9800 entries instead of 1000= 0 - most possible that you just have a=C2=A0small mistake when you work wit= h your counter and these entries were not written to the DB:=C2=A0if(counter=3D=3D100)

Anyway, for both problems community need additi= onal information for an investigation. It would be great if you could share= your full project with all configs and code, so the community can fast rep= roduce your issue and help you.

Evgenii


2018-01-14 10:32 GMT+0= 3:00 Rajarshi Pain <rajarshi20@gmail.com>:
Hello,

Can someone = please help me on this scenario if somewhere I am making any mistake ?

Thanks,
Raj

On Fri, Jan 12,= 2018 at 11:57 PM, Rajarshi Pain <rajarshi20@gmail.com> w= rote:
Hi,

=
We were doing a POC(Ignite 2.3 - oracle) to check how cache Persistenc= e Store works using writeBehind, We are updating data as a batch rather tha= n updating one by one record.

though there are no = duplication record but still getting "unique constraint" exceptio= n.

We couldnt find any root cause for this not sur= e is any issue if this is a possible ignite bug as this error is coming ran= domly.=C2=A0

Also in another POC we have seen that= it's not inserting all the data to the database.
For example= we have pushed 10K but in Database we can only see 9800, though there is n= o error or exception.

could you please shade some = lights on these issues ?

Sample Code:
for(int i=3D1;i<=3D100000;i++)
{=C2=A0
=
frstnm=3D"test1name"+i;
scndnm=3D"test2name&q= uot;;
p1 =3D new Person(i, frstnm, scndnm);
cache.put((= long)i, p1);
}=C2=A0
=C2=A0

in= sert into PERSON (id, firstname, lastname) values (?, ?, ?)=C2=A0

inside write:=C2=A0

st.setL= ong(1, val.getId());
st.setString(2, val.getFirstName());
st.setString(3, val.getLastName());
st.addBatch();
i= f(counter=3D=3D100)
{
System.out.println("Counter = "+ counter);
st.executeBatch();
counter=3D0;
=
}

got exception after 11K records= =C2=A0

Exception Occuredjava.sql.BatchUpdateException: ORA-00001: unique constraint =E2=80=8B

-= -
Regards,
Rajarshi Pain



--
Regards,
Rajarshi Pain

--001a113781e85d13c10562cc0704--