Errors resulting in early Op destruction would erroneously
be escalated to "Not in running evbase worker" exceptions.
Something has already gone wrong, but this would mask the
root cause.
Added test case for PVA link with 'time:true' and checked if cached timestamp and userTag/UTAG are propagated
Convert snap_tag to uint32_t to avoid sign extension. Modified test case
to cover this scenario.
Move validation cross-check earlier to avoid possible deref of
NULL RequestFL.
handle_MONITOR() decoded the message payload before validating it against
the operation state. The data branch takes Guard G(info->fl->lock), but
info->fl stays null until the INIT reply has been processed, so a peer
that has acknowledged CREATE_CHANNEL -- the op then sits in opByIOID with
state==Creating and fl==nullptr -- could send a MONITOR data message
before the INIT reply and dereference the null free-list, a
remote-triggerable client crash.
Move the operation-state validation (handle.lock(), op==CMD_MONITOR, and
the subcmd-vs-state check) ahead of the payload-decode block. A data
message in the Creating state now faults the buffer and the connection is
dropped before any access to info->fl, so "payload is decoded only after
a successful INIT" holds by construction rather than by a trailing check.
Apply recursion limit to decoding
Adds a testxcode regression that decodes a long run of 0x82 and asserts
the decode faults instead of recursing without bound.
No point to wait for processing, when none will occur.
However, wait as requested when Unset or True.
Somewhere between 409b432dd96b65e8c69d35fe8810081b8ff87a0a
and 93e4d3eef3
the sense of this test was lost.
A "N%" ackAny was computed as percent*queueSize on the client and
percent*limit on the server, without dividing by 100, then clamped to
the queue size. Any percentage >= 1% therefore saturated to the full
queue, so ackAny="50%" behaved as 100% and defeated percentage-style
ack control.
Divide the clamped percent by 100 on both the client (clientmon.cpp)
and server (servermon.cpp) parsing paths.
Note: this changes the negotiated ack threshold for existing
percentage ackAny requests.
ServerMonitorControl::stats() assigned mon->nSquash to stat.nQueue,
overwriting the queue depth set just above, and never assigned
stat.nSquash. Callers of MonitorControlOp::stats() therefore could
not observe the real unsent-queue depth once squashing had occurred,
and never received the squash count in its documented field.
Assign mon->nSquash to stat.nSquash.
pvaLink cached the remote timeStamp.userTag in fld_usertag but never
assigned snap_tag from it (pvalink.h initialises snap_tag to 0 and no
code path updated it), so pvaGetTimeStampTag() always returned 0.
Records reading a user tag through a PVA link lost that metadata.
Assign snap_tag from fld_usertag in the same snapshot block that
derives snap_time from fld_seconds/fld_nanoseconds, defaulting to 0
when the field is absent.
Missing initialization of SecurityLogger::pchan
prevents restore logic from triggering.
Remove default value so that compiler complains if used
without initialization.
Add testConstNonAtomicGet(): a non-atomic get of the tst:const group
asserts s.i/s.d/s.s == 14/1.5/"hello". Fails before the fix (all defaults),
passes after.
A non-atomic group get (record[atomic=false]) gated each field read on
`pDbChannel && leafNode`, so fields with no dbChannel were silently
skipped. MappingInfo::Const fields carry a constant value rather than a
channel, so a non-atomic get returned them at their cloneEmpty() defaults
(0 / 0.0 / ""), while the atomic get and monitor paths return the constant.
Mirror the atomic branch's field selection in the non-atomic branch: skip
only Proc/Structure and read every other field, taking the per-field
DBLocker only when a channel is present. getGroupField() already handles
channel-less fields via field.info, so Const fields populate correctly.