From a8ef365d6d6f14e53d3c72cdf318390a23b2f6a9 Mon Sep 17 00:00:00 2001 From: Sagie Maoz Date: Tue, 31 Dec 2024 15:15:43 -0500 Subject: [PATCH] DATA-3192: Change collector default queue size to 0 --- services/datamanager/builtin/capture/capture.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/services/datamanager/builtin/capture/capture.go b/services/datamanager/builtin/capture/capture.go index 47d10b700ea..21ecce0566c 100644 --- a/services/datamanager/builtin/capture/capture.go +++ b/services/datamanager/builtin/capture/capture.go @@ -21,14 +21,9 @@ import ( "go.viam.com/rdk/services/datamanager" ) -// TODO: re-determine if queue size is optimal given we now support 10khz+ capture rates -// The Collector's queue should be big enough to ensure that .capture() is never blocked by the queue being -// written to disk. A default value of 250 was chosen because even with the fastest reasonable capture interval (1ms), -// this would leave 250ms for a (buffered) disk write before blocking, which seems sufficient for the size of -// writes this would be performing. -const defaultCaptureQueueSize = 250 - const ( + // Default channel size for collector's capture results. + defaultCaptureQueueSize = 0 // Default bufio.Writer buffer size in bytes. defaultCaptureBufferSize = 4096 defaultMongoDatabaseName = "sensorData"