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 <rajarsh...@gmail.com> 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 than > 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=1;i<=100000;i++) > { > frstnm="test1name"+i; > scndnm="test2name"; > p1 = 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==100) > { > System.out.println("Counter "+ counter); > st.executeBatch(); > counter=0; > } > > got exception after 11K records > > Exception Occuredjava.sql.BatchUpdateException: ORA-00001: unique > constraint > > -- > Regards, > Rajarshi Pain > -- Regards, Rajarshi Pain