Actions
Bug #11330
closedInventory endpoint info api is reporting saturated off by one
Status:
Released
Priority:
N/A
Assignee:
Category:
Web - Nodes & inventories
Target version:
Pull Request:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Very Small
Priority:
49
Name check:
Fix check:
Regression:
Description
I got this back from the API endpoint while testing the inventory uploader:
{"queueMaxSize":50, "queueFillCount":49, "queueSaturated":true}
I have tested on: rudder-inventory-endpoint-4.1.5.release-1.SLES.11
Updated by Janos Mattyasovszky over 7 years ago
- Related to User story #9976: API endpoint to get information about queue status of uploaded inventories added
Updated by Janos Mattyasovszky over 7 years ago
In #9976 the example shows saturated when both are equal:
{ "queueMaxSize": 200, "queueFillCount": 200, "queueSaturated": true }
There is something bogus here :)
Updated by François ARMAND over 7 years ago
The code is:
lazy val queueSize = AtomicInt(0) .... def queueInfo() { ... val current = queueSize.get val saturated = (current+1) >= maxQueueSize val code = if(saturated) HttpStatus.TOO_MANY_REQUESTS else HttpStatus.OK ... } ... // see if you can add a file val canDo = synchronized { if(queueSize.incrementAndGet(1) <= maxQueueSize) { // the decrement will be done by the report processor true } else { ....
So for maxQueue = 50, in info, current queue = 49, +1 = 50 >= 50 => "saturated".
In canDo, current = 49, incrementAndGet(1) = 50 <= 50 => true
Updated by François ARMAND over 7 years ago
- Category set to Web - Nodes & inventories
- Assignee set to François ARMAND
- Target version set to 4.1.8
- User visibility changed from Infrequent - complex configurations | third party integrations to Operational - other Techniques | Technique editor | Rudder settings
- Effort required set to Very Small
- Priority changed from 22 to 49
Updated by François ARMAND over 7 years ago
- Status changed from New to In progress
Updated by François ARMAND over 7 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/ldap-inventory/pull/119
Updated by François ARMAND over 7 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset ldap-inventory|8c460847fad68e1cb6898463f7ed9cd1ed6bc9dd.
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 4.1.8 to 4.1.7
Updated by Vincent MEMBRÉ over 7 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 4.1.7 and 4.2.0~rc1 which were released today.
- 4.1.7: Announce Changelog
- 4.2.0~rc1: Announce Changelog
- Download: https://www.rudder-project.org/site/get-rudder/downloads/
Actions