Replication: Update monitoring views and table functions for OPTIMIZED_ REFRESH in failover groups (Pending)¶
Attention
This behavior change is in the 2026_05 bundle.
For the current status of the bundle, refer to Bundle history.
When this behavior change bundle is enabled, the public monitoring surfaces for replication and failover groups expose the count of objects that actually changed during a refresh. The following surfaces are affected:
- The ACCOUNT_USAGE.REPLICATION_GROUP_REFRESH_HISTORY view
- The ORGANIZATION_USAGE.REPLICATION_GROUP_REFRESH_HISTORY view
- The REPLICATION_GROUP_REFRESH_HISTORY table function (Information Schema)
- The REPLICATION_GROUP_REFRESH_PROGRESS,
REPLICATION_GROUP_REFRESH_PROGRESS_BY_JOB, andREPLICATION_GROUP_REFRESH_PROGRESS_ALLtable functions (Information Schema) - The REPLICATION_GROUP_USAGE_HISTORY table function (Information Schema)
- Before the change:
The
OBJECT_COUNTJSON value (in theREPLICATION_GROUP_REFRESH_HISTORYfamily of views and table function) and thedetailsJSON value for theSECONDARY_DOWNLOADING_METADATAphase (in theREPLICATION_GROUP_REFRESH_PROGRESSfamily of table functions) reported onlytotalObjectsandcompletedObjects, both at the top level and inside eachobjectTypesentry. TheREPLICATION_GROUP_USAGE_HISTORYtable function reported credit and byte usage but did not surface the number of objects that changed during each refresh. There was no way to distinguish how many objects were actually changed by a refresh from how many objects the refresh inspected.- After the change:
OBJECT_COUNTin theREPLICATION_GROUP_REFRESH_HISTORYviews and table functionA new
changedObjectsfield is included at the top level of the JSON value and inside eachobjectTypesentry. The field reports the number of objects that changed during the refresh. The shape of theOBJECT_COUNTvalue depends on the OPTIMIZED_REFRESH setting of the failover group. (OPTIMIZED_REFRESHapplies only to failover groups; refreshes of replication groups behave the same as failover-group refreshes withOPTIMIZED_REFRESH = FALSE.)-
For refreshes where
OPTIMIZED_REFRESH = FALSE(the current default), theOBJECT_COUNTvalue continues to includetotalObjectsandcompletedObjectsalongside the newchangedObjectsfield: -
For refreshes where
OPTIMIZED_REFRESH = TRUE, theOBJECT_COUNTvalue contains only thechangedObjectsfield. ThetotalObjectsandcompletedObjectsfields are omitted, both at the top level and inside eachobjectTypesentry, because Optimized Refresh inspects only changed objects:
detailsin theREPLICATION_GROUP_REFRESH_PROGRESSfamily of table functionsIn the
detailsJSON for theSECONDARY_DOWNLOADING_METADATAphase reported by theREPLICATION_GROUP_REFRESH_PROGRESS,REPLICATION_GROUP_REFRESH_PROGRESS_BY_JOB, andREPLICATION_GROUP_REFRESH_PROGRESS_ALLtable functions, all three fields (totalObjects,completedObjects, andchangedObjects) are always present, regardless of theOPTIMIZED_REFRESHsetting:New
CHANGED_OBJECT_COUNTcolumn in theREPLICATION_GROUP_USAGE_HISTORYtable functionThe
REPLICATION_GROUP_USAGE_HISTORYtable function (Information Schema) returns a newCHANGED_OBJECT_COUNTcolumn of typeNUMBER, which reports the count of objects that changed during each refresh. The column is populated for refreshes of replication groups and for failover-group refreshes whereOPTIMIZED_REFRESH = FALSE. As before, the table function does not return rows for failover-group refreshes whereOPTIMIZED_REFRESH = TRUE.Migration note
If you have queries or scripts that parse
OBJECT_COUNTand assume thattotalObjectsorcompletedObjectsare always present, update them to handle the case where these fields are omitted for failover-group refreshes withOPTIMIZED_REFRESH = TRUE.-
This change exposes the count of objects that actually changed during a refresh, which helps you size and monitor replication workloads more accurately, especially for failover groups that use Optimized Refresh.
Ref: 2340