Skip to content

Commit

Permalink
Merge branch '3.8' of https://github.com/JumpMind/symmetric-ds.git in…
Browse files Browse the repository at this point in the history
…to 3.8
  • Loading branch information
jumpmind-josh committed Jan 31, 2017
2 parents 70d4491 + 5c3d8c0 commit 0b6f514
Showing 1 changed file with 17 additions and 2 deletions.
Expand Up @@ -79,7 +79,6 @@ public void process() throws IOException {
IStagedResource resource = null;
String line = null;
long startTime = System.currentTimeMillis(), ts = startTime, lineCount = 0;


while (reader.readRecord()) {
line = reader.getRawRecord();
Expand Down Expand Up @@ -175,7 +174,23 @@ public void process() throws IOException {
} else if (line.startsWith(CsvConstants.CHANNEL)) {
channelLine = line;
} else {
int size = line.length();
TableLine batchLine = batchTableLines.get(tableLine);
if (batchLine == null || (batchLine != null && batchLine.columnsLine == null)) {
TableLine syncLine = syncTableLines.get(tableLine);
if (syncLine != null) {
log.debug("Injecting keys and columns to be backwards compatible");
if (batchLine == null) {
batchLine = syncLine;
batchTableLines.put(batchLine, batchLine);
writeLine(batchLine.tableLine);
}
batchLine.keysLine = syncLine.keysLine;
writeLine(syncLine.keysLine);
batchLine.columnsLine = syncLine.columnsLine;
writeLine(syncLine.columnsLine);
}
}
int size = line.length();
if (size > MAX_WRITE_LENGTH) {
log.debug("Exceeded max line length with {}", size);
for (int i = 0; i < size; i = i + MAX_WRITE_LENGTH) {
Expand Down

0 comments on commit 0b6f514

Please sign in to comment.