Skip to content

Commit

Permalink
Merge branch '3.11' of https://github.com/JumpMind/symmetric-ds.git i…
Browse files Browse the repository at this point in the history
…nto 3.11
  • Loading branch information
vanmetjk committed May 21, 2020
2 parents 54d2aa4 + e5534c7 commit 90e1ab8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1025,13 +1025,13 @@ protected OutgoingBatch extractOutgoingBatch(ProcessInfo extractInfo, Node targe

if (currentBatch.getStatus() == Status.IG) {
cleanupIgnoredBatch(sourceNode, targetNode, currentBatch, writer);
} else if (!isPreviouslyExtracted(currentBatch, false)) {
} else if (currentBatch.getStatus() == Status.RQ || !isPreviouslyExtracted(currentBatch, false)) {
BatchLock lock = null;
try {
log.debug("{} attempting to acquire lock for batch {}", targetNode.getNodeId(), currentBatch.getBatchId());
lock = acquireLock(currentBatch, useStagingDataWriter);
log.debug("{} acquired lock for batch {}", targetNode.getNodeId(), currentBatch.getBatchId());
if (!isPreviouslyExtracted(currentBatch, true)) {
if (currentBatch.getStatus() == Status.RQ || !isPreviouslyExtracted(currentBatch, true)) {
log.debug("{} extracting batch {}", targetNode.getNodeId(), currentBatch.getBatchId());
currentBatch.setExtractCount(currentBatch.getExtractCount() + 1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ public <T> T getObjectFromResultSet(ResultSet rs, Class<T> clazz) throws SQLExce
String s = rs.getString(1);
Date d = null;

d = FormatUtils.parseDate(s,FormatUtils.TIMESTAMP_PATTERNS);
if (s != null) {
d = FormatUtils.parseDate(s, FormatUtils.TIMESTAMP_PATTERNS);
}

if (Timestamp.class.isAssignableFrom(clazz)) {
if (d != null && Timestamp.class.isAssignableFrom(clazz)) {
return (T) new Timestamp(d.getTime());
} else {
return (T) d;
Expand Down

0 comments on commit 90e1ab8

Please sign in to comment.