Skip to content

Commit b0aa02c

Browse files
committed
change var names and add better comment
1 parent 2576d57 commit b0aa02c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

android/src/main/java/com/genexus/db/DataStoreProvider.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,15 @@ public synchronized void execute(int cursorIdx, Object[] parms)
173173
DataSource ds = getDataSourceNoException();
174174
if(ds!=null && ds.jdbcIntegrity==false)
175175
{
176-
// If the JDBC integrity is disabled, SQLIte is in autocommit mode.
176+
// If the JDBC integrity is disabled (XBASE_TINT), SQLIte is in autocommit mode.
177177
// we need to lock the execute method to avoid concurrency issues.
178178
// for example, the postExecute method (select changes()) cause exception in Android SQLite.
179+
// it happends with execute sql statements like from diferent threads, like using procedures submit.
179180
AndroidLog.debug("execute cursorIdx : " + cursorIdx);
180-
long timeStamp = System.currentTimeMillis();
181+
long timeStampStart = System.currentTimeMillis();
181182
lockExecute.lock();
182-
long timeStampLock2 = System.currentTimeMillis();
183-
AndroidLog.debug("START execute afterlock cursorIdx: " + cursorIdx + " Waiting time: " + (timeStampLock2 - timeStamp));
183+
long timeStampLock = System.currentTimeMillis();
184+
AndroidLog.debug("START execute afterlock cursorIdx: " + cursorIdx + " Waiting time ms: " + (timeStampLock - timeStampStart));
184185
try
185186
{
186187
// execute the cursor with the parameters.
@@ -190,8 +191,8 @@ public synchronized void execute(int cursorIdx, Object[] parms)
190191
{
191192
lockExecute.unlock();
192193
}
193-
long timeStamp2 = System.currentTimeMillis();
194-
AndroidLog.debug("END execute cursorIdx: " + cursorIdx+ " Execute time: " + (timeStamp2 - timeStampLock2));
194+
long timeStampEnd = System.currentTimeMillis();
195+
AndroidLog.debug("END execute cursorIdx: " + cursorIdx+ " Execute time ms: " + (timeStampEnd - timeStampLock));
195196
}
196197
else
197198
{

0 commit comments

Comments
 (0)