Mike Gentrry -> I agree 10 is a small batch size, but I wanted to keep it
small to start to get a sense of if this was going to work. Given that it's
looking better and better that number is probably going to grow, maybe
substantially.
Lon - the problem is that the batch entries all fails together
Actually most (or all?) DBs that cayenne supports will do a batch bind for
multiple inserts, which is quite a bit faster than issuing separate sql
statements.
On Thu, Jun 24, 2021 at 10:14 AM Jurgen Doll wrote:
> I'm not sure about this, but I don't think Cayenne does SQL batch insert
> statemen
I'm not sure about this, but I don't think Cayenne does SQL batch insert
statements - it does each insert (even in a batch) as single SQL insert
statements. If this is the case then there's no real advantage, I think,
to doing batch commits with Cayenne in this particular case (or am I
mist
10 is a rather small batch size. I'd suggest at least 100, perhaps even
1000, unless you are expecting tons of problem records.
For your hashing concerns, could you maybe store that in an H2 DB you use
for this migration?
On Wed, Jun 23, 2021 at 12:54 PM Tony Giaccone wrote:
> Yeah, that's not
You could commit your batch of 10 and then on error, check each object
against the DB. If the batch succeeds, there is nothing special to do.
Assuming your "failure" batches are infrequent, then the time to check them
won't be an issue.
On Wed, Jun 23, 2021 at 9:54 AM Tony Giaccone wrote:
> Yea
Yeah, that's not a solution that's going to work. I need to move about a
million records from one database to a second, and the delay associated
with querying the database for every record would take a problem that's
already going to take more than a day to complete and turn it into several
days.
I think it would be better to figure out the "problem" objects before
committing by querying the DB and the object context.
On Wed, Jun 23, 2021 at 9:47 AM Tony Giaccone wrote:
> I have a list of 10 new objects that I've inserted into the objectcontex
> and am about to do a commit changes on the
I have a list of 10 new objects that I've inserted into the objectcontex
and am about to do a commit changes on the object context.
One, or more, of those entries violates a constraint and causes the commit
changes to throw an exception.
Now most of them are probably ok, so I want to make sure t
de the
> > run
> > > time go to 4 minutes and I can live with that. What I really wanted to
> do
> > > was find a way to recover from a larger commit. It seems that's not
> > really
> > > possible. The one feature that would make that failure easier to deal
ssible. The one feature that would make that failure easier to deal
> with
> > would be some kind of data value in commit error that would identify the
> > class and key value of the object that caused the commit exception. I
> > recognize that the value is there in the text, but p
really
> possible. The one feature that would make that failure easier to deal with
> would be some kind of data value in commit error that would identify the
> class and key value of the object that caused the commit exception. I
> recognize that the value is there in the text, but pars
was find a way to recover from a larger commit. It seems that's not really
> possible. The one feature that would make that failure easier to deal with
> would be some kind of data value in commit error that would identify the
> class and key value of the object that caused the com
not really
possible. The one feature that would make that failure easier to deal with
would be some kind of data value in commit error that would identify the
class and key value of the object that caused the commit exception. I
recognize that the value is there in the text, but parsing through
Commit the ObjectContext after each object/row and rollback the
ObjectContext on failure.
On Thu, Sep 27, 2018 at 3:57 PM Tony Giaccone wrote:
> So the question isn't as much about who to manage the transaction. It's
> more about how to recover and eliminate the offending object so that the
> co
So the question isn't as much about who to manage the transaction. It's
more about how to recover and eliminate the offending object so that the
commit can be made again.
On Thu, Sep 27, 2018 at 3:52 PM John Huss wrote:
> I'd just wrap the whole thing in a database transaction. Then commit your
I'd just wrap the whole thing in a database transaction. Then commit your
ObjectContexts as often as you want to, but the real DB commit won't happen
until the end.
TransactionManager transactionManager = CayenneRuntime.*getThreadInjector*
().getInstance(TransactionManager.*class*);
transactionMa
I'm processing a large number of rows, over 600,000 and the key value
should be unique in this file but I'd like to ensure that. I also want this
to happen with some rapidity. To speed this process upI'm going to read
lines from the file, create objects and commit the changes after 500 have
been c
ate MySQL options (e.g. those in my.cnf).
Andrus
On Jan 12, 2008, at 10:08 PM, marco turchi wrote:
Hi Andrus,
I have created the new url adding what u have suggested me...
but I get again the same error:
org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.3 May 6
2007] Commit
E
new url adding what u have suggested me...
> > > > > value="jdbc:mysql://enm-nc-srv1/subsumer?
> > > connectTimeout=0&autoReconnect=true"/>
> > > but I get again the same error:
> > > org.objectstyle.cayenne.CayenneRuntimeE
t;
> > Hi Andrus,
> > I have created the new url adding what u have suggested me...
> > > value="jdbc:mysql://enm-nc-srv1/subsumer?
> > connectTimeout=0&autoReconnect=true"/>
> > but I get again the same error:
> > org.objectstyle.
.2.3 May 6
2007] Commit
Exception
at org.objectstyle.cayenne.access.DataContext.flushToParent(
DataContext.java:1290)
at org.objectstyle.cayenne.access.DataContext.commitChanges(
DataContext.java:1166)
at com.translation.alg.WriterData.insert(WriterData.j
Hi Andrus,
I have created the new url adding what u have suggested me...
but I get again the same error:
org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.3 May 6 2007] Commit
Exception
at org.objectstyle.cayenne.access.DataContext.flushToParent(
DataContext.java:1290)
at
ews...
I have run the software using the changes that u have suggested me,
but I
get:
10 Jan 2008 23:19:30,036 - ERROR main
com.translation.alg.TranslationNews -
Fatal Error:
org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.3 May 6
2007] Commit
Exception
at org.objectstyle.cayenne.access.DataContext.flushToParent(
no good news...
> > > I have run the software using the changes that u have suggested me,
> > > but I
> > > get:
> > > 10 Jan 2008 23:19:30,036 - ERROR main
> > > com.translation.alg.TranslationNews -
> > > Fatal Error:
> > >
hanges that u have suggested me,
> > but I
> > get:
> > 10 Jan 2008 23:19:30,036 - ERROR main
> > com.translation.alg.TranslationNews -
> > Fatal Error:
> > org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.3 May 6
> > 2007] Commit
> > E
[v.1.2.3 May 6
2007] Commit
Exception
at org.objectstyle.cayenne.access.DataContext.flushToParent(
DataContext.java:1290)
at org.objectstyle.cayenne.access.DataContext.commitChanges(
DataContext.java:1166)
at com.translation.alg.WriterData.insert(WriterData.java
Hi Andrus,
no good news...
I have run the software using the changes that u have suggested me, but I
get:
10 Jan 2008 23:19:30,036 - ERROR main com.translation.alg.TranslationNews -
Fatal Error:
org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.3 May 6 2007] Commit
Exception
at
sorry about that... :-)
Thanks
Marco
On Jan 10, 2008 12:47 PM, Andrus Adamchik <[EMAIL PROTECTED]> wrote:
> Ah cool. I thought I was going crazy :-)
>
> Andrus
>
> On Jan 10, 2008, at 2:37 PM, marco turchi wrote:
>
> > Hi Andrus,
> > sorry you are right I have added the autoReconnect to the wrong
Ah cool. I thought I was going crazy :-)
Andrus
On Jan 10, 2008, at 2:37 PM, marco turchi wrote:
Hi Andrus,
sorry you are right I have added the autoReconnect to the wrong
place...
now the software is started, I'll see what happens at the end...
thanks
Marco
On Jan 10, 2008 11:01 AM, marco
Hi Andrus,
sorry you are right I have added the autoReconnect to the wrong place...
now the software is started, I'll see what happens at the end...
thanks
Marco
On Jan 10, 2008 11:01 AM, marco turchi <[EMAIL PROTECTED]> wrote:
>
>
> value="jdbc:mysql://enm-nc-srv1/subsumer?autoReconne
thanks
Marco
On Jan 10, 2008 10:51 AM, Andrus Adamchik <[EMAIL PROTECTED]> wrote:
>
>
>
> On Jan 10, 2008, at 12:33 PM, marco turchi wrote:
>
> >>> DataSource load failed - Can not load JDBC driver named
> >>> 'com.mysql.jdbc.Driver
> >>> ?autoReconnect=true': com.mys
On Jan 10, 2008, at 12:33 PM, marco turchi wrote:
DataSource load failed - Can not load JDBC driver named
'com.mysql.jdbc.Driver
?autoReconnect=true': com.mysql.jdbc.Driver?autoReconnect=true
But this is what generates an error... so somehow the driver name
seems messed up. Could you po
/test?autoReconnect=true
> >>
> >> Andrus
> >>
> >>
> >> On Jan 8, 2008, at 8:02 PM, marco turchi wrote:
> >>
> >>> Dear experts,
> >>> I'm running a java software that gets some data from the DB,
>
untimeException: [v.1.2.3 May 6
2007] Commit
Exception
at org.objectstyle.cayenne.access.DataContext.flushToParent(
DataContext.java:1290)
at org.objectstyle.cayenne.access.DataContext.commitChanges (
DataContext.java:1166)
at com.translation.alg.WriterData
tation of the
> > data gets 10 hs...
> > I'm able to get the data, compute them, but when I try to write to
> > the DB, I
> > get this error:
> > org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.3 May 6
> > 2007] Commit
&
d the writes the result to the DB... Unfortunately, the
computation of the
data gets 10 hs...
I'm able to get the data, compute them, but when I try to write to
the DB, I
get this error:
org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.3 May 6
2007] Commit
Exception
this error:
org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.3 May 6 2007] Commit
Exception
at org.objectstyle.cayenne.access.DataContext.flushToParent(
DataContext.java:1290)
at org.objectstyle.cayenne.access.DataContext.commitChanges (
DataContext.java:1166)
at com.translation.alg.WriterD
hi,
we have some trouble with our clustered applications. after restarting one of
the servers the user gets a commit exception (see below).
i think that this is already reported as a bug, but jira seems to be down...
https://issues.apache.org/cayenne/browse/CAY-796
is there something we can do
38 matches
Mail list logo