Commit 5f32b34
CBG-5715: bound max_processes, mirror the _changes body defaults
max_processes is a uint, and db/event_manager.go:69-70 maps 0 to
kMaxActiveEvents (500), so document minimum: 0 with the effective
default and say what 0 means. Raised by Copilot on #8654.
heartbeat and timeout in the _changes POST bodies now carry the same
defaults and bounds already documented on the GET query parameters:
heartbeat defaults to 0 and, when non-zero, is clamped up to
kMinHeartbeatMS (25000); timeout defaults to kDefaultTimeoutMS (300000)
and is capped at kMaxTimeoutMS (900000). See GetRestrictedInt, which
readChangesOptionsFromJSON calls with allowZero=true. Copilot flagged
these as heartbeat-only, but the timeout default is 300000, not 0.
Also drops the revs_limit allow_conflicts note. Both branches it
describes exist (db/database.go:504-508, rest/config.go:936-940) but
neither is reachable from config: allow_conflicts=true is rejected in
the same validateVersion (rest/config.go:1149-1150) and
DefaultAllowConflicts is false, so only the test-only
EnableAllowConflicts gets there. Raised by @factory-droid on #8656.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 1149c75 commit 5f32b34
3 files changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1274 | 1274 | | |
1275 | 1275 | | |
1276 | 1276 | | |
1277 | | - | |
| 1277 | + | |
1278 | 1278 | | |
| 1279 | + | |
| 1280 | + | |
1279 | 1281 | | |
1280 | 1282 | | |
1281 | 1283 | | |
| |||
1613 | 1615 | | |
1614 | 1616 | | |
1615 | 1617 | | |
1616 | | - | |
1617 | | - | |
1618 | 1618 | | |
1619 | 1619 | | |
1620 | 1620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
| 193 | + | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
196 | 200 | | |
197 | 201 | | |
198 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
| 180 | + | |
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
183 | 187 | | |
184 | 188 | | |
185 | 189 | | |
| |||
0 commit comments