Allow DataStore to auto disable on connection failure

Description

The new functionality aims to allow the autodisabling of the datastore on connection failure. The behaviour will be controlled by the addition of a new property to flag from UI or REST endpoint in case the autodisabling functionality needs to be enable. By default it will be disabled.

Environment

None

Activity

Andrea Aime 
July 22, 2022 at 3:46 PM

you’re off the mark here… GeoServer tries to connect to the stores, and disables them on failure, only during startup, and only if the global setting about skipping misconfigured layers is disabled (otherwise it does not even try, making startup so much faster).

Even when enabled, it’s not useful if a connection issue happens later, and the connection fails to timeout and throw an exception quickly. We have experienced tens of minutes of wait on both WMS/WMTS cascading and Oracle stores, due to network issues. When this happens, we don’t want GeoServer to try again and then again and so on, blocking more request threads, and never getting back to a sane state. With the flag turned on, after the first time out the store is disabled and the server resumes operations.

The flag is opt-in, the behavior by default is not changing, it can be used by those experiencing problems like the ones above, if they choose to do so.

Jody Garnett 
July 22, 2022 at 3:32 PM

I see the PR was merged; okay then…

Jody Garnett 
July 22, 2022 at 3:29 PM

Setting enabled flag in the catalog is disabling the datastore :)

Issue with setting enabled false and storing that is in the catalog is … when a database that was offline returns to service the WFS does not resume serving those layers.

The enabled status in the UI also has a “warning” state when a datastore is enabled but not available. If this is not meeting your needs perhaps it could be improved?

Marco Volpini 
July 22, 2022 at 3:21 PM

My apologies for late response on your comment Jody.

The functionality aims at setting to false the enable flag and persist the modification in the catalog in case the new option is flagged. The resourcepool is not disabling any store when the connection fails.

Jody Garnett 
July 15, 2022 at 2:57 PM

I thought they already did this? Perhaps only during initial connection attempt?

So what is the user experience you are trying for here …

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created July 15, 2022 at 7:54 AM
Updated July 22, 2022 at 3:46 PM
Resolved July 22, 2022 at 3:13 PM