phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Pompermaier <pomperma...@okkam.it>
Subject Mutation state batch upserts
Date Tue, 23 Jan 2018 11:20:37 GMT
Hi to all,
I've tested a program that writes (UPSERTS) to Phoenix using executeBatch().
In the logs I see "*Sent batch of 2 for SOMETABLE*" .
Is this correct? I fear that the batch is not executed in batch but
statement by statement.. the code within the
PhoenixStatement.executeBatch() is:

for (i = 0; i < returnCodes.length; i++) {
  PhoenixPreparedStatement statement = batch.get(i);
  returnCodes[i] = statement.execute(true) ? Statement.SUCCESS_NO_INFO :
statement.getUpdateCount();
}
flushIfNecessary();


Moreover, flushIfNecessary() doesn't actually flush anything because
connection is not in autoflush modedeed,

Am I wrong? Is the batch committed correctly or is it committed upsert by
upsert?

Best,
Flavio

Mime
View raw message