[SERVER-81030] Streams: throw error for window size of 0 Created: 13/Sep/23  Updated: 29/Oct/23  Resolved: 14/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Jonathan Dahl Assignee: Matthew Normyle
Resolution: Fixed Votes: 0
Labels: cloud-dev
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Atlas Streams
Backwards Compatibility: Fully Compatible
Sprint: Sprint 31
Participants:

 Description   

error message when window size is <0 says 0 is valid, when using 0 processor wont run and error message is vague
Created with Jira Integration+ for joe.niemiec (joe.niemiec@mongodb.com)

 

 

 MongoServerError: this request has failed: (Location51024) BSON field ‘size’ value must be >= 0, actual value ‘-100’, correlationID = 17847b9917b4085af6c76fc0

 
{
'$tumblingWindow': {
interval:

{ size: Int32(0), unit: 'second' }

,
pipeline: [
{
'$group': {
_id:

{ device_id: '$device_id' }

,
max_temp: { '$max': '$obs.temp' },
max_watts: { '$max': '$obs.watts' },
min_watts: { '$min': '$obs.watts' },
avg_watts: { '$avg': '$obs.watts' },
median_watts: { '$median':

{ input: '$obs.watts', method: 'approximate' }

}
}
}
]
}
}
AtlasStreamProcessing> sp.process([s,w4])
MongoServerError: error starting sample: (InvalidOptions) streamProcessor does not exist: internal-anon-stream-processor-6501c6fb88aac01124d0e8a1, correlationID = 17847ba0f7f2167ef6c7703c
AtlasStreamProcessing> sp.process([s,w4])
MongoServerError: operation exceeded time limit, correlationID = 17847ba3811d30d3f6c770b1
AtlasStreamProcessing> sp.process([s,w4])
MongoServerError: operation exceeded time limit, correlationID = 17847ba85f5dd9e9f6c770d2


Generated at Thu Feb 08 06:45:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.