Fix
I wasn't flushing writter buffer if the limit is reached as I return early
This commit is contained in:
parent
b7878227e9
commit
b480cff079
@ -271,6 +271,7 @@ fn parseEntitiesOneFile(
|
|||||||
const allocator = fa.allocator();
|
const allocator = fa.allocator();
|
||||||
|
|
||||||
var buffered_writer = std.io.bufferedWriter(writer);
|
var buffered_writer = std.io.bufferedWriter(writer);
|
||||||
|
defer buffered_writer.flush() catch {};
|
||||||
|
|
||||||
const path = std.fmt.bufPrint(&path_buffer, "{d}.zid", .{file_index}) catch return;
|
const path = std.fmt.bufPrint(&path_buffer, "{d}.zid", .{file_index}) catch return;
|
||||||
var iter = zid.DataIterator.init(allocator, path, dir, zid_schema) catch return;
|
var iter = zid.DataIterator.init(allocator, path, dir, zid_schema) catch return;
|
||||||
@ -288,7 +289,6 @@ fn parseEntitiesOneFile(
|
|||||||
|
|
||||||
if (sync_context.incrementAndCheckStructLimit()) return;
|
if (sync_context.incrementAndCheckStructLimit()) return;
|
||||||
}
|
}
|
||||||
buffered_writer.flush() catch return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Receive a map of UUID -> empty JsonString
|
// Receive a map of UUID -> empty JsonString
|
||||||
|
Loading…
x
Reference in New Issue
Block a user