This procedure is defined in the server but not documented via ad_proc or proc_doc and may be intended as a private interface.
The procedure is defined as:
proc nsmcp::accessIngestionProgress {token stage phase bytes batch} {
if {$token eq {}} {
return
}
set stateKey nsmcp:access-writer:[ns_info server]
if {![nsv_exists $stateKey state]} {
return
}
set state [nsv_get $stateKey state]
if {![dict get $state running] || [dict get $state token] ne $token} {
return
}
set now [clock clicks -milliseconds]
set times [dict get $state phaseMilliseconds]
dict incr times [dict get $state phase] [expr {max(0,$now-[dict get $state phaseTicks])}]
dict set state phaseMilliseconds $times
# Preserve the failing operation when finally/destructor cleanup follows it.
if {$phase in {store-cleanup restore-connection release-handle store-closed}} {
if {![dict exists $state cleanupOriginPhase]} {
dict set state cleanupOriginPhase [dict get $state phase]
}
} else {
dict unset state cleanupOriginPhase
}
dict set state phase $stage/$phase
dict set state phaseTicks $now
dict incr state parsedBytes $bytes
if {$phase eq "commit" && [dict exists $batch sqlite]} {
dict set state currentSQLite [dict get $batch sqlite]
} elseif {$phase eq "sqlite-statistics"} {
dict set state currentSQLite {}
}
if {$phase eq "committed" && $batch ne {}} {
foreach field {records requestRecords malformedRecords oversizedRecords} {
dict incr state $field [dict get $batch $field]
}
dict incr state committedBatches
dict set state lastBatch $batch
if {[dict exists $batch sqlite]} {
set sample [dict get $batch sqlite]
set totals [dict get $state sqlite]
foreach key {commitMicroseconds samplingMicroseconds} {
dict incr totals $key [dict get $sample $key]
}
if {[dict get $sample available]} {
dict incr totals measuredBatches
foreach key {cacheHits cacheMisses cacheWrites cacheSpills tempBufferSpillBytes} {
dict incr totals $key [dict get $sample delta $key]
}
dict incr totals commitCacheWrites [dict get $sample commitDelta cacheWrites]
} else {
dict incr totals unavailableBatches
}
dict set state sqlite $totals
}
}
nsv_set $stateKey state $state
}