nsmcp::UnifiedAccessAnalytics method retentionTick (public)
<instance of nsmcp::UnifiedAccessAnalytics> retentionTick
Defined in /usr/local/ns/tcl/nsmcp/log-traffic-unified.tcl
Run and reschedule one retention-maintenance callback. Use a one-shot scheduling chain so maintenance retries do not phase-lock with the ingestion timer.
- Returns:
- The scheduler callback result.
- Testcases:
- No testcase defined.
Source code: # A single threaded one-shot chain avoids phase-locking a periodic # maintenance timer to the ingestion timer. Busy work retries later. set delay ${:retentionInterval} set began [clock clicks -milliseconds] try { set result [:retain] if {[dict exists $result busy] || [:dict getdef $result more false]} { # Leave at least two run durations idle after cleanup. The cap # bounds adaptive backoff; the configured minimum always wins. set duration [expr {max([:dict getdef $result durationMs 0], [clock clicks -milliseconds]-$began)}] set delay [expr {max(${:retentionRetryInterval}, min(${:retentionInterval},ceil(2.0*$duration/1000.0)))}] } set key nsmcp:access-retention:[ns_info server] if {[nsv_exists $key state]} { set state [nsv_get $key state] dict set state nextDelaySeconds $delay dict set state nextRunAt [expr {[clock seconds]+int(ceil($delay))}] nsv_set $key state $state } return $result } finally { catch { ns_schedule_proc -once -thread $delay [self] retentionTick } }XQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)