From 3612f9875ce92e06dee50ad20579bc57737c3bcf Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 13 Feb 2024 08:33:31 -0800 Subject: [PATCH] fixup! feat: simple CircularBuffer with fs offsets --- packages/telemetry/src/flight-recorder.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/telemetry/src/flight-recorder.js b/packages/telemetry/src/flight-recorder.js index 254acad53139..8e7870371f83 100644 --- a/packages/telemetry/src/flight-recorder.js +++ b/packages/telemetry/src/flight-recorder.js @@ -242,19 +242,19 @@ export const makeSimpleCircularBuffer = async ({ */ const writeRecord = async (record, firstWriteLength, circEnd) => { await file.write( - record.subarray(0, firstWriteLength), + record, // TS saying options bag not available - undefined, - undefined, + 0, + firstWriteLength, Number(circEnd) + header.byteLength, ); if (firstWriteLength < record.byteLength) { // Write to the beginning of the arena. await file.write( - record.subarray(firstWriteLength, record.byteLength), - undefined, - undefined, - header.byteLength, + record, + firstWriteLength, + record.byteLength - firstWriteLength, + I_ARENA_START, ); }