nsmcp::accessScanRangeSave

 nsmcp::accessScanRangeSave

Defined in

Partial Call Graph (max 5 caller/called nodes):
accessFileScan accessFileScan nsmcp::accessScanRangeSave nsmcp::accessScanRangeSave accessFileScan->nsmcp::accessScanRangeSave instproc instproc instproc->nsmcp::accessScanRangeSave nsmcp::LogCorrelation nsmcp::LogCorrelation nsmcp::LogCorrelation->nsmcp::accessScanRangeSave nsmcp::accessScanRangeKey nsmcp::accessScanRangeKey nsmcp::accessScanRangeSave->nsmcp::accessScanRangeKey nsmcp::accessScanRangeMature nsmcp::accessScanRangeMature nsmcp::accessScanRangeSave->nsmcp::accessScanRangeMature

Testcases:
No testcase defined.
Source code:
    if {![dict get $file rotation] || [dict get $file rangeUncertain] || ![accessScanRangeMature $file $limits]} {
        return
    }
    set key [accessScanRangeKey $file $options]
    if {$key eq ""} {
        return
    }
    set store nsmcp:access-time-ranges:[ns_info server]
    # Bounded process-local metadata, never a cache of log bodies or identities.
    set entries {}
    foreach old [nsv_array names $store] {
        if {$old eq $key} {
            continue
        }
        if {[nsv_exists $store $old]} {
            lappend entries [list [dict get [nsv_get $store $old] observedAt] $old]
        }
    }
    foreach pair [lrange [lsort -integer -decreasing -index 0 $entries] 127 end] {
        nsv_unset -nocomplain $store [lindex $pair 1]
    }
    nsv_set $store $key [dict create minimum [dict get $file rangeMin] maximum [dict get $file rangeMax] observedAt [clock seconds]]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: