|
35 | 35 | startup
|
36 | 36 | triggers
|
37 | 37 | pool
|
| 38 | + query-pool |
38 | 39 | recovery
|
39 |
| - security |
40 | 40 | watchdog
|
| 41 | + lock-manager |
41 | 42 | repository
|
42 | 43 | binary-manager
|
43 | 44 | indexer
|
|
74 | 75 |
|
75 | 76 | - http://exist-db.org/exist/apps/doc/configuration.xml
|
76 | 77 | - http://exist-db.org/exist/apps/doc/documentation.xml
|
77 |
| - - http://atomic.exist-db.org/ |
78 |
| - |
79 |
| - Version: 3.3.0-SNAPSHOT |
80 | 78 |
|
81 | 79 | -->
|
82 | 80 | <exist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="schema/conf.xsd">
|
|
148 | 146 | with high load will never be shrinked. A negative value means that
|
149 | 147 | shrinkage will not be performed.
|
150 | 148 |
|
151 |
| - - doc-ids: |
152 |
| - how document ids are managed by eXist. Takes the values |
153 |
| - "default" or "incremental". |
154 |
| - |
155 |
| - eXist assigns a unique, 32bit integer document id to every |
156 |
| - document. When a document is deleted, its id will be freed |
157 |
| - and reused for the next document stored. The disadvantage |
158 |
| - of this approach is that document ids |
159 |
| - are not stable, i.e. one cannot be sure that the same document |
160 |
| - id will always identify the same document. |
161 |
| -
|
162 |
| - If you need stable, incremental ids, set the option doc-ids to |
163 |
| - "incremental". |
164 | 149 | - minDiskSpace:
|
165 | 150 | The amount of disk space (in megabytes) which should be available for
|
166 | 151 | the database to continue operations. If free disk space goes below
|
167 | 152 | the configured limit, eXist-db will flush all buffers to disk and
|
168 | 153 | switch to read-only mode in order to prevent potential data loss.
|
169 | 154 | Set the limit large enough to allow all pending operations to
|
170 | 155 | complete. Set to -1 to disable. The default is 1 gigabyte.
|
171 |
| - |
| 156 | +
|
| 157 | + - posix-chown-restricted: |
| 158 | + As defined by POSIX.1 for _POSIX_CHOWN_RESTRICTED. |
| 159 | +
|
| 160 | + When posix-chown-restricted="true" (the default) then: |
| 161 | + 1. Only a superuser process can change the user ID of the file. |
| 162 | + 2. A non-superuser process can change the group ID of the file |
| 163 | + if the process owns the file (the effective user ID equals |
| 164 | + the user ID of the file), and group equals either the |
| 165 | + effective group ID of the process or one of the |
| 166 | + process’s supplementary group IDs. |
| 167 | + This means that when posix-chown-restricted="true", you can’t change |
| 168 | + the user ID of your files. You can change the group ID of files that |
| 169 | + you own, but only to groups that you belong to. |
| 170 | +
|
| 171 | + When posix-chown-restricted="false" you can change the user ID of |
| 172 | + any file that you own, effectively "giving away the file" to |
| 173 | + another user. Such a setting has negative security implications, |
| 174 | + further details can be seen in the "Rationale" section for the |
| 175 | + chown function in the POSIX.1-2017 (Issue 7, 2018 edition) standard. |
| 176 | + See: http://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html#tag_16_59_07 |
| 177 | +
|
| 178 | + - preserve-on-copy |
| 179 | + When copying Collections and Documents within the database, the |
| 180 | + default (`false`), is not to preserve their attributes |
| 181 | + (modification time, mode, user-id, group-id, and ACL). |
| 182 | +
|
| 183 | + NOTE: Not preserving attributes, is inline with both the GNU and |
| 184 | + BSD `cp` commands, and therefore expected behaviour; The target |
| 185 | + Collection or Document is created following the rules of the |
| 186 | + target parent, and the effective user and their umask. |
| 187 | +
|
| 188 | + Setting preserve-on-copy="true" changes the default behaviour |
| 189 | + so that the target Collection or Document of a copy, has the same |
| 190 | + attributes as the source. |
| 191 | +
|
| 192 | + The preserve-on-copy setting can be overridden on a case-by-case |
| 193 | + basis by setting the `preserve` flag to either `true` or `false` |
| 194 | + when calling xmldb:copy(), or via any other API that supports copy. |
| 195 | + Omitting the preserve flag when calling a copy operation, implies |
| 196 | + the behaviour that is set in this configuration. |
| 197 | +
|
172 | 198 | =====================================================================
|
173 | 199 |
|
174 | 200 | The settings below are very conservative to avoid out-of-memory
|
|
180 | 206 | -->
|
181 | 207 | <db-connection cacheSize="256M" checkMaxCacheSize="true" collectionCache="64M" database="native"
|
182 | 208 | files="${basedir}/target/test-data" pageSize="4096" nodesBuffer="1000" cacheShrinkThreshold="10000"
|
183 |
| - doc-ids="default" minDiskSpace="1024M"> |
| 209 | + minDiskSpace="1024M" posix-chown-restricted="true" preserve-on-copy="false"> |
184 | 210 |
|
185 | 211 | <!--
|
186 | 212 | Startup Triggers are executed before the database becomes generally available
|
187 | 213 | for service and have complete access to the database as the SYSTEM broker
|
188 | 214 | -->
|
189 | 215 | <startup>
|
190 | 216 | <triggers>
|
191 |
| - <!-- |
192 |
| - Trigger for registering the GNU Crypto JCE Provider with Java |
193 |
| - --> |
194 |
| - <trigger class="org.exist.security.BouncyCastleJceProviderStartupTrigger"/> |
| 217 | + |
| 218 | + <!-- |
| 219 | + Trigger for registering the GNU Crypto JCE Provider with Java |
| 220 | + --> |
| 221 | + <trigger class="org.exist.security.BouncyCastleJceProviderStartupTrigger"/> |
195 | 222 |
|
196 | 223 | <!--
|
197 | 224 | Trigger for registering eXists XML:DB URL handler with Java
|
|
247 | 274 | by threads, each thread needs a private copy of a query.
|
248 | 275 |
|
249 | 276 | - timeout:
|
250 |
| - amount of time that a query will be cached in the query-pool. |
251 |
| - |
252 |
| - - timeout-check-interval: |
253 |
| - time between checking for timed out queries. For value "-1" |
254 |
| - the time out is switched off, resulting cached queries to remain |
255 |
| - in the cache forever. |
| 277 | + amount of time that a query will be cached in the query-pool in milliseconds. |
256 | 278 | -->
|
257 |
| - <query-pool max-stack-size="64" size="128" timeout="120000" |
258 |
| - timeout-check-interval="30000"/> |
| 279 | + <query-pool max-stack-size="64" size="128" timeout="120000"/> |
259 | 280 |
|
260 | 281 | <!--
|
261 | 282 | Settings for the journaling and recovery of the database. With
|
|
353 | 374 |
|
354 | 375 | </db-connection>
|
355 | 376 |
|
| 377 | + |
| 378 | + <!-- |
| 379 | + Settings for the Database Lock Manager |
| 380 | +
|
| 381 | + - upgrade-check |
| 382 | + Used by developers for diagnosing illegal lock upgrade issues. When enabled |
| 383 | + checks for lock upgrading within the same thread, i.e. READ_LOCK -> WRITE_LOCK |
| 384 | + are enabled. When an illegal upgrade is detected a LockException is thrown. |
| 385 | + Such behaviour will likely corrupt any database writes, and should only be |
| 386 | + used by developers when debugging database issues. |
| 387 | +
|
| 388 | + This can also be set via the Java System Properties `org.exist.lock-manager.upgrade-check`, |
| 389 | + or (legacy) `exist.lockmanager.upgrade.check`. |
| 390 | +
|
| 391 | + - warn-wait-on-read-for-write |
| 392 | + Used by developers for diagnosing lock performance issues. When enabled |
| 393 | + checks for detecting when a thread wants to acquire the WRITE_LOCK |
| 394 | + but another thread holds the READ_LOCK are enabled. When such operations |
| 395 | + are detected a log message is written to locks.log at WARN level. |
| 396 | +
|
| 397 | + This can also be set via the Java System Properties `org.exist.lock-manager.warn-wait-on-read-for-write`, |
| 398 | + or (legacy) `exist.lockmanager.warn.waitonreadforwrite`. |
| 399 | +
|
| 400 | + - paths-multi-writer |
| 401 | + Set to true to enable Multi-Writer/Multi-Reader semantics for |
| 402 | + the database Collection/Document Hierarchy as opposed to the default (false) |
| 403 | + for Single-Writer/Multi-Reader. |
| 404 | +
|
| 405 | + NOTE: Whilst enabling Multiple-Writers on the Collection and Document Hierarchy can improve concurrent |
| 406 | + through-put for write-heavy workloads, it can also can lead to deadlocks unless the User's |
| 407 | + Collection Hierarchy is carefully designed to isolate query/database writes between Collection combs. |
| 408 | + It is highly recommended that users leave this as the default setting. For more information, see: |
| 409 | + "Locking and Cache Improvements for eXist-db", 2018-02-05, Section "Attempt 6" Page 58 - |
| 410 | + https://www.evolvedbinary.com/technical-reports/exist-db/locking-and-cache-improvements/ |
| 411 | +
|
| 412 | + This can also be set via the Java System Properties `org.exist.lock-manager.paths-multiple-writers`, |
| 413 | + or (legacy) `exist.lockmanager.paths-multiwriter`. |
| 414 | + --> |
| 415 | + <lock-manager |
| 416 | + upgrade-check="false" |
| 417 | + warn-wait-on-read-for-write="false" |
| 418 | + paths-multi-writer="false"> |
| 419 | + |
| 420 | + <!-- |
| 421 | + Settings for the Lock Table |
| 422 | +
|
| 423 | + - disabled |
| 424 | + Disables the database lock table which tracks database locks. The Lock Table is enabled by default |
| 425 | + and allows reporting on database locking via JMX. |
| 426 | +
|
| 427 | + NOTE: Tracking locks via the Lock Table imposes a small overhead per-Lock. Once users |
| 428 | + have finished testing their system to ensure correct operation, they may wish to disable |
| 429 | + this in production to ensure the absolute best performance. |
| 430 | +
|
| 431 | + This can also be set via the Java System Properties `org.exist.lock-manager.lock-table.disabled`, |
| 432 | + or (legacy) `exist.locktable.disable`. |
| 433 | +
|
| 434 | + - trace-stack-depth |
| 435 | + When set above 0, this captures n frames of each threads stack that performs a try/lock/release |
| 436 | + operation. These frames are visible from JMX reporting. |
| 437 | + In addition, when the logging level for the Lock Table is set in log4j2.xml to TRACE the lock |
| 438 | + events are written to the locks.log file. |
| 439 | +
|
| 440 | + This can also be set via the Java System Properties `org.exist.lock-manager.lock-table.trace-stack-depth`, |
| 441 | + or (legacy) `exist.locktable.trace.stack.depth`. |
| 442 | + --> |
| 443 | + <lock-table disabled="false" trace-stack-depth="0"/> |
| 444 | + |
| 445 | + |
| 446 | + <!-- Settings for Document Locking |
| 447 | +
|
| 448 | + - use-path-locks |
| 449 | + Set to true to have documents participate in the same hierarchical |
| 450 | + path based locking strategy as Collections. |
| 451 | +
|
| 452 | + This has a performance and concurrency impact, but will ensure |
| 453 | + that you cannot have deadlocks between Collections and Documents. |
| 454 | +
|
| 455 | + NOTE: in future this will likely be set to `true` by default. |
| 456 | +
|
| 457 | + This can also be set via the Java System Property `org.exist.lock-manager.document.use-path-locks`. |
| 458 | + --> |
| 459 | + <document use-path-locks="false"/> |
| 460 | + |
| 461 | + </lock-manager> |
| 462 | + |
356 | 463 | <!--
|
357 | 464 | Settings for the package repository:
|
358 | 465 |
|
|
542 | 649 | <!--
|
543 | 650 | Default settings for parsing structured documents:
|
544 | 651 |
|
| 652 | + - xml (optional) |
| 653 | +
|
| 654 | + - features |
| 655 | + Any default SAX2 feature flags to set on the parser |
| 656 | +
|
| 657 | + - feature |
| 658 | + - name |
| 659 | + the name of the feature flag |
| 660 | + - value |
| 661 | + the value of the feature flag |
| 662 | +
|
| 663 | +
|
545 | 664 | - html-to-xml (optional)
|
546 | 665 |
|
547 | 666 | - class
|
|
579 | 698 | -->
|
580 | 699 | <parser>
|
581 | 700 |
|
| 701 | + <xml> |
| 702 | + |
| 703 | + <features> |
| 704 | + |
| 705 | + <!-- NOTE: the following feature flags should likely be set in production to ensure a secure environment --> |
| 706 | + |
| 707 | + <!-- |
| 708 | + <feature name="http://xml.org/sax/features/external-general-entities" value="false"/> |
| 709 | + <feature name="http://xml.org/sax/features/external-parameter-entities" value="false"/> |
| 710 | + <feature name="http://javax.xml.XMLConstants/feature/secure-processing" value="true"/> |
| 711 | + --> |
| 712 | + |
| 713 | + </features> |
| 714 | + |
| 715 | + </xml> |
| 716 | + |
582 | 717 | <!-- html-to-xml class="org.ccil.cowan.tagsoup.Parser"/ -->
|
583 | 718 |
|
584 | 719 | <html-to-xml class="org.cyberneko.html.parsers.SAXParser">
|
|
750 | 885 | enable-query-rewriting="yes" backwardCompatible="no"
|
751 | 886 | enforce-index-use="always"
|
752 | 887 | raise-error-on-failed-retrieval="no">
|
753 |
| - |
| 888 | + |
754 | 889 | <builtin-modules>
|
755 | 890 | <module uri="http://www.w3.org/2005/xpath-functions/map" class="org.exist.xquery.functions.map.MapModule" />
|
756 | 891 | <module uri="http://www.w3.org/2005/xpath-functions/math" class="org.exist.xquery.functions.math.MathModule" />
|
|
0 commit comments