Let a PostgreSQL parameter carry a whole cellular trace
The adapter bounded each parameter to 4 KiB of text (ADR-0059), and a cellular publication sends its replay trace as one hex bytea parameter, so a 64-tick batch or a one-tick batch of about 85 lives was refused client-side as "invalid". CI run 372 hit this in the M11.4c-1 publication test. ADR-0126 raises the bound to 4 MiB, enough for the largest trace the codec admits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -101,8 +101,11 @@ bool wait(PGconn* c, short events, Clock::time_point deadline) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// ADR-0126: a parameter holds at most 4 MiB of text, enough for the largest cellular trace
|
||||
// (64 ticks of 256 lives) as a hex bytea; it was 4 KiB before profile-4 traces.
|
||||
constexpr std::size_t max_parameter_bytes = std::size_t{4} * 1024 * 1024;
|
||||
bool bounded(const std::string& s) {
|
||||
return s.size() <= 4096 && s.find('\0') == std::string::npos;
|
||||
return s.size() <= max_parameter_bytes && s.find('\0') == std::string::npos;
|
||||
}
|
||||
bool duration(std::chrono::milliseconds t) {
|
||||
return t.count() > 0 && t.count() <= 30000;
|
||||
|
||||
Reference in New Issue
Block a user