To the first point, what I'm saying is the most recent record in the base table (according to editor tracking) is from 2019-09-18 15:23:13.0 and therefore every other record in that table is older than that. (And would therefore indicate that the base table has never been updated!?)
An astute guess! We do indeed have offline replicas in the mix here. Everything is configured according to this Esri doc here. The FS is configured to create a version per user. We have a version of the data to control all the field user/offline versions as described in the article and we would most closely resemble 'Workflow 3'
The script responsible for dealing with the versions (using code similar to what is cited in the doc) utilizes the same GP tool you reference.
The code builds a list of versions who's parent version is the DB version I mention above and then reconciles them, and then reconciles the controlling version to the default version. Partial code here:
verReconcileList = []
#Create a list of children of the Data Inspector version:
for version in versions:
if version.parentVersionName == inspectionVersion:
verReconcileList.append(version.name)
versionName = (version.name.split(".")[1]).split("/")[0]
lastModified = version.lastModified
print("{0} Last modified: {1}".format(versionName,lastModified))
# Perform maintenance if versions are found, otherwise there is no maintenance to perform.
if len(verReconcileList)>0:
# Get a list of versions from the database
versions = arcpy.da.ListVersions(workspace)
# Reconcile user versions to CollectedFieldData version
arcpy.ReconcileVersions_management(workspace, "ALL_VERSIONS", inspectionVersion, verReconcileList, "LOCK_ACQUIRED", "NO_ABORT", "BY_OBJECT", "FAVOR_TARGET_VERSION", "POST", "KEEP_VERSION", "c:/temp/reconcilelogCollected.txt")
# Reconcile CollectedFieldData version to Default version
arcpy.ReconcileVersions_management(workspace, "ALL_VERSIONS", "sde.DEFAULT", inspectionVersion, "LOCK_ACQUIRED", "NO_ABORT", "BY_OBJECT", "FAVOR_TARGET_VERSION", "POST", "KEEP_VERSION", "c:/temp/reconcilelogDefault.txt")
In order to control lag between user syncs and making updates visible to web services and GIS staff, this script is run twice a day.
We know it's working because we see the edits in both the 'Inspector' version and the default version.
Everything looks fine in the Esri view of the data table in SSMS as well...just not the base table. To reiterate: looking at the base table, it appears that no records have ever been updated here.
The best compress end state count we can achieve is 61 which isn't too surprising given that Esri's offline data mechanism is apparently prone to creating orphan versions/replicas (according to the Geodata analyst i've worked with in the past).
I just cannot understand how this base table reflects no changes/edits...looks like a snapshot of the data from ~3 years ago....