Skip to content
Permalink
Browse files

0002449: File sync sometimes not deleting files with delete_after_sync

  • Loading branch information...
erilong committed Nov 19, 2015
1 parent 80dcb8b commit 68646c276f6f122f80fa54ed7ec8da08742d7344
@@ -495,16 +495,14 @@ synchronized public RemoteNodeStatuses pushFilesToNodes(boolean force) {

public void acknowledgeFiles(OutgoingBatch outgoingBatch) {
log.debug("Acknowledging file_sync outgoing batch-{}", outgoingBatch.getBatchId());
ISqlReadCursor<Data> cursor = engine.getDataService().selectDataFor(
outgoingBatch.getBatchId(), outgoingBatch.getChannelId());
Data data = null;
List<File> filesToDelete = new ArrayList<File>();
Table snapshotTable = platform.getTableFromCache(
TableConstants.getTableName(tablePrefix, TableConstants.SYM_FILE_SNAPSHOT), false);
for (int i = 0; i < outgoingBatch.getInsertEventCount(); i++) {
data = cursor.next();
if (data != null
&& (data.getDataEventType() == DataEventType.INSERT || data.getDataEventType() == DataEventType.UPDATE)) {
ISqlReadCursor<Data> cursor = engine.getDataService().selectDataFor(
outgoingBatch.getBatchId(), outgoingBatch.getChannelId());
Data data = cursor.next();
while (data != null) {
if (data.getDataEventType() == DataEventType.INSERT || data.getDataEventType() == DataEventType.UPDATE) {
Map<String, String> columnData = data.toColumnNameValuePairs(
snapshotTable.getColumnNames(), CsvData.ROW_DATA);

@@ -534,6 +532,7 @@ public void acknowledgeFiles(OutgoingBatch outgoingBatch) {
}
}
}
data = cursor.next();
}

if (cursor != null) {

0 comments on commit 68646c2

Please sign in to comment.
You can’t perform that action at this time.