HOW TO
Workflows have been identified that can cause inconsistencies in the branch versioning system tables. When such an issue is encountered, features with missing branch versioning metadata can cause data inconsistencies when the version is reconciled, posted, and/or deleted.
The issue is a result of how the branch versioning metadata is maintained during save edits, reconcile and post. During these operations, branch versioning metadata may be removed from the geodatabase. When the branch version metadata is incorrectly removed, features may not correctly participate in future operations such as reconcile, post and delete version, resulting in inconsistent data. This issue occurred under race conditions where competing requests caused branch versioning metadata to be incorrectly removed for valid features.
Operations executing against incorrect branch versioning metadata could lead to:
These system table inconsistencies are prevented and corrected in the following versions:
Upgrading an enterprise geodatabase will additionally check for any data inconsistencies in relation to branch versioned data. Inconsistencies are resolved during the upgrade by either creating new versions with repaired data, or by updating existing versions. These versions should be reviewed to determine if any of the data in the versions should be posted to Default.
This article describes the workflow to review inconsistencies resolved after a geodatabase upgrade. As noted above, the upgrade can repair the data in two fashions: creating a new recovery version or updating an existing version. For the purpose of this article, these versions will be referred to as new recovery versions and existing versions that have recovered rows, respectively. The geodatabase reviewed in the article has two versions that will be accessed and reviewed. The versions are named:
The workflow provided shows where the information about these versions can be gathered, how to connect to these versions, and what actions may be required against these versions in ArcGIS Pro.
The following is an outline of the workflow:
WARNING 003929: During the upgrade recovery versions (<value>) were created that require further review. Review <value> for more detail.
If inconsistencies are detected during the upgrade process, the Upgrade Geodatabase tool returns a warning stating how many versions were recovered as well as the location of the sde_setup.log file, as shown in the next image. Messages about geodatabase upgrades are written to the sde_setup.log file, which is created in the directory specified for your %TEMP% variable on the computer where the tool is run. The number of versions refers to both new recovery versions as well as existing versions that have recovered rows. The sde_setup.log file contains additional information about the versions that were repaired.
Note: If using Python to upgrade the geodatabase, use the following example to ensure that warnings are properly returned to report recovery versions. If no warning is returned, no data inconsistencies were found in the geodatabase and no further action is required.
import arcpy
arcpy.UpgradeGDB_management(
input_workspace=r"C:\temp\sysadmin_connection.sde",
input_prerequisite_check="PREREQUISITE_CHECK",
input_upgradegdb_check="UPGRADE"
)
warnings = arcpy.GetMessages(1)
errors = arcpy.GetMessages(2)
if "WARNING 003929" in warnings:
print(warnings)
elif "Recovery versions" in warnings:
recovery_versions = warnings[warnings.find("Recovery versions"):warnings.find(")") + 1]
for item in warnings.split("\n"):
if "sde_setup.log" in item:
logfile_loc = item.strip()
print("--------------------------------------------------------------------------------------------------")
print(f"WARNING 003929: During the upgrade {recovery_versions} were created that require further review.")
print(f"Review {logfile_loc} for more detail.")
print("--------------------------------------------------------------------------------------------------")
if errors:
print(errors)
If necessary, download and open the example sde_setup_howto.log file in a text editor; sections of this file are referenced in the following steps.
[08:51:34.091] ================================================================== [08:51:34.091] Begin recovery of branch versioned data associated with a missing branch... [08:51:37.302] Created recovery version(s): [08:51:37.302] sde.RECOVERY_VERSION_BR_1 with edits to: [08:51:37.302] - CREATOR1.POINT [08:51:37.302] - CREATOR1.LINE [08:51:37.302] - CREATOR1.POLYGON [08:51:37.302] Completed recovery of branch versioned data associated with a missing branch. [08:51:37.302] An administrator must update the service_name for the above versions in the sde.SDE_branches table in order for users to connect and review. [08:51:37.303] ==================================================================
[08:51:37.304] Begin recovery of branch versioned data associated with an invalid common ancestor moment... [08:51:37.622] Recovered rows in version(s): [08:51:37.622] ADMIN.EXISTING_VERSION (service: Post_DataLoss) with edits to: [08:51:37.622] - CREATOR1.POINT Object ID(s) : {46,436} [08:51:37.622] - CREATOR1.POLYGON Object ID(s) : {462} [08:51:37.622] Completed recovery of branch versioned data associated with an invalid common ancestor moment. [08:51:37.622] A portal user must connect and review the above version(s).
There are a few required steps before the recovery versions can be reviewed. The following section describes the process to prepare both the new recovery versions and the existing versions that have recovered rows to be accessed and reviewed.
To prepare each new recovery version with the RECOVERY_VERSION_BR_<branch_id> naming convention:
Note: If a service does not exist in your portal with these datasets referenced, a new service must be published. Add these distinct datasets to a new map as the dataset owner, and publish a web feature layer with the version management capability enabled (Share branch versioned data).
UPDATE sde.sde_branches SET service_name = 'my_service_name' WHERE name = 'RECOVERY_VERSION_BR_1';
Note: If a service does not exist in your portal with these datasets referenced, a new service must be published. Add these distinct datasets to a new map as the dataset owner, and publish a web feature layer with the version management capability enabled (Share branch versioned data), using the same service name.
The versions are now prepared for consumption to review the repaired data.
Note: If a new recovery version only has edits to dataset system tables, for example: only Utility Network system tables, the Differences view may not display changes; therefore, the version can be deleted.
Get help from ArcGIS experts
Download the Esri Support App