Skip to content
Permalink
Browse files
NOJIRA should resolve CI failures
  • Loading branch information
spyhunter99 committed May 16, 2022
1 parent 52760e8 commit 8bc8f2d9dba18ff1b5d7c1d735cd6ad78dab9bfa
Showing 1 changed file with 12 additions and 7 deletions.
@@ -1187,17 +1187,22 @@ public List<ChangeRecordIDType> getHighWaterMarks()
}
}
}
//dont forget this node
Long id = (Long) em.createQuery("select (e.id) from ChangeRecord e where e.nodeID = :node order by e.id desc")
.setParameter("node", getNode()).setMaxResults(1).getSingleResult();
if (id == null) {
id = 0L;
}
//dont forget this node
Query setMaxResults = em.createQuery("select (e.id) from ChangeRecord e where e.nodeID = :node order by e.id desc")
.setParameter("node", getNode()).setMaxResults(1);
Long id =null;
if (setMaxResults.getResultList().isEmpty()) {
//this can happen at or near startup
id = 0L;
} else {
id = (Long) em.createQuery("select (e.id) from ChangeRecord e where e.nodeID = :node order by e.id desc")
.setParameter("node", getNode()).setMaxResults(1).getSingleResult();
}
ChangeRecordIDType x = new ChangeRecordIDType();
x.setNodeID(getNode());
x.setOriginatingUSN(id);
ret.add(x);

tx.rollback();
long procTime = System.currentTimeMillis() - startTime;
serviceCounter.update(ReplicationQuery.GET_HIGHWATERMARKS, QueryStatus.SUCCESS, procTime);

0 comments on commit 8bc8f2d

Please sign in to comment.