Possible impacts of manually removing replicas

506
3
Jump to solution
01-30-2023 10:35 AM
AaronKoelker
Occasional Contributor III

Hello,

I have a use-case where staff need to be able to take non-editable reference data offline in their Field Maps projects—which is straightforward. The twist, however, is that these reference datasets are part of our Open Data catalog and have regular refreshes using various sources/methods, and we are not able to have enable the sync capability of a Feature Service on them directly. So very long story short, I wrote a Notebook to essentially create and maintain some 'Offline' versions of these reference layers, that would refresh from the source layers on a schedule, making sure our users always had an offline-ready version of these basic organizational datasets for their offline various projects.

This has worked mostly well so far, with the exception of one major issue—the script can't complete its updates if there are any outstanding replicas on those offline copies.

Since these reference datasets are not editable, I thought it might be okay to just add a step that clears out the outstanding replicas each time before attempting to update — however I'm uncertain how this might affect other editable layers within the project web map. The notebook doesn't directly interact with those at all, but I'm worried that when they go to sync those field edits from the layers that are actually editable, the missing replicas for the non-editable data may prevent the app from being able to sync anything in the project at all.

Does anyone know what might happen in this case? I hope my question/situation makes sense. I figured I'd reach out here first to see if anyone knew or had experience with this, and potentially save myself the effort of setting up a big test project.

 

Thanks!

-Aaron
0 Kudos
1 Solution

Accepted Solutions
AaronKoelker
Occasional Contributor III

Well, I went ahead and tested it using a dummy project and data. The answer is it does prevent Field Maps from syncing ALL of the layers, if one or more of the replicas is missing for any layer, even it the layer has no edits to push up. I was hoping it would sync the editable layers just fine and then just skip or ignore any missing replicas for the reference data, since there were no edits for them to be pushed.

Back to the drawing board, I guess.

 

EDIT: For reference, the error you get in Field Maps is "Error while handling start sync geodatabase on the server."

-Aaron

View solution in original post

0 Kudos
3 Replies
AaronKoelker
Occasional Contributor III

Well, I went ahead and tested it using a dummy project and data. The answer is it does prevent Field Maps from syncing ALL of the layers, if one or more of the replicas is missing for any layer, even it the layer has no edits to push up. I was hoping it would sync the editable layers just fine and then just skip or ignore any missing replicas for the reference data, since there were no edits for them to be pushed.

Back to the drawing board, I guess.

 

EDIT: For reference, the error you get in Field Maps is "Error while handling start sync geodatabase on the server."

-Aaron
0 Kudos
JakeMatthys
Occasional Contributor II

One thing you could explore... your notebook process makes its edits to the 'reference' data via a replica and syncs them.  Then the editors get those updates when they sync as well.  I have tried something similar in the past (unsuccessfully, but don't let my failures discourage your effort).

0 Kudos
AaronKoelker
Occasional Contributor III

Thanks @JakeMatthys . That's going to be my next direction, though I've never tried to make edits via a replica from a script before. If I manage to get it to work, I'll try and share what I did.

-Aaron