Use correct default number of available slots when creating a new node record

RESOLVED FIXED

Status

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: rfkelly, Assigned: rfkelly)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
Created attachment 8544285 [details] [diff] [review]
ts-correct-default-available-slots.diff

This fixes a bug in the implementation of Bug 8459539.  The add_node() method calculates a default value for the `available` column based on total capacity and the configured release rate.  But it incorrectly passes the full value of `capacity` through when inserting the node.

The patch simply fixes it to use the pre-calculated default value.

AFAICT this bug will not affect ops because they do not (yet) use this method when adding nodes, instead doing a direct row insert at the SQL level.
Attachment #8544285 - Flags: review?(telliott)
Attachment #8544285 - Flags: review?(telliott) → review+
(Assignee)

Comment 1

4 years ago
https://github.com/mozilla-services/tokenserver/commit/225ad20140742fb8c1e748efc2301c6d59735596
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.