Select to view content in your preferred language

Attribute Rules - A Deep Dive - DevSummit 2024

1427
5
07-05-2024 08:58 AM
HusseinNasser2
Esri Contributor

Here is this year's attribute rules session, filled with new content and great questions from the audience! 

https://mediaspace.esri.com/media/t/1_r9zuohx4/325483122 

 

0 Kudos
5 Replies
Brian_Wilson
Honored Contributor

In the video you talk about the maxCacheAge default. Can you provide links to learn more about that? I can't find anything.

Also referring to Feature Datasets you say that opening any feature class in the FD causes all of them to be opened. Same Q, can you provide any more information on that?

So far in my shop I have only found FDs to be annoying, the problems they cause seem to outweigh any benefits. The good news is there are only 2 in our "Enterprise" geodatabase.

0 Kudos
Brian_Wilson
Honored Contributor

More important to me than either of those (maxCacheAge and FDs) -- schemaLockingEnabled=true

Since we're only READING data through Server, to publish web maps, is there any case where we'd still want schema locks enabled on any service?

When a service is in a SHARED instance it still has a schemaLockingEnabled property and it looks like I can still edit it. Your video says only to turn off the locking on a dedicated instance. Why?

How can I tell what services share the same instance?

 

That's three questions in one post. Sorry about that. 🙂 Cheers.

 

0 Kudos
HusseinNasser2
Esri Contributor

Because the services is reading and caching the definitions of the geodatabase it acquires the shared lock. This blocks anyone from going to the database and update the definition which will result in the service having stale/outdated definitions which can cause problems.


If you know that, hey I'm just changing an alias of a field or adding a comment to an attribute rule, yes it is updating the definition but it won't cause any harm, then yes it is safe to uncheck that option so the service won't acquire any locks.  and Yes we refer to dedicated instances here because those cache the definitions. I'm not familiar very much with shared instances behavior but I would assume they destroy all cache after every request because you could open multiple workspaces on the same shared process and that will cause bloat in memory and perhaps bugs.

 

For the maxCacheAge, you can add only add it in the admin api, right under the properties of the mapserver of your service. I think if the default is 300 (5 minutes), is it not there by default. thanks for bringing up the issue that it isn't in the doc 

HusseinNasser2_0-1720465769428.png

 

For the feature dataset question I don't think we document that as its an implementation details so it won't be in the official doc, but perhaps mentioning it as part of best practices in general would be good idea. 

If you enabled debug logging , you should see a debug entry, something like this. Which tells you how long the broadcast took, and how many tables/classes and relationships were touched. So if you have a feature dataset with 100 classes, and you just published one of those classes as a service, all 100 will be opened when you edit that class. 

BeginBroadcastStopEditing;Broadcasting Stop editing accross: 1 Feature Datasets, 24 Tables, 17 Relationships

Hope that helps

 

 

0 Kudos
Brian_Wilson
Honored Contributor

BeginBroadcastStopEditing;Broadcasting Stop editing accross: 1 Feature Datasets, 24 Tables, 17 Relationships

I don't leave logging in DEBUG because it's so verbose. Which log? What triggers that message?

I looked at the log for the service itself in services/Taxlots.MapServer and at the one in server/

0 Kudos
Brian_Wilson
Honored Contributor

I will probably have to remove some of the rules that I set up for our cartographers because the way Attribute Rules work is so limited. Mainly they need to be able to override some rules when creating new features and the "Disable rule" feature is broken because of schema locking.

Maybe I can try using INSERT only for some of the rules.

If I understood your video correctly, even if they were able to disable a rule during edits, the rule will fire again in a database compress and overwrite their edits. Is that right?

Things that worked perfectly with Attribute Assistant will no longer work with Attribute Rules.

If I had time, I'd write a new version of AA for them. But I retire end of the month. Pity.

 

0 Kudos