Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-16637: Add syncLevel configuration option to the reference guide (#1315)

bszabo975298ef274f76
diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/commits-transaction-logs.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/commits-transaction-logs.adoc
index da25bfc28dc..23b2955d3b6 100644
--- a/solr/solr-ref-guide/modules/configuration-guide/pages/commits-transaction-logs.adoc
+++ b/solr/solr-ref-guide/modules/configuration-guide/pages/commits-transaction-logs.adoc
@@ -279,6 +279,21 @@ The number of buckets used to keep track of maximum version values when checking
Increase this value to reduce the cost of synchronizing access to version buckets during high-volume indexing.
This requires `(8 bytes (long) * numVersionBuckets)` of heap space per Solr core.
+`syncLevel`::
++
+[%autowidth,frame=none]
+|===
+|Optional |Default: `FLUSH`
+|===
++
+The sync level of the transaction log files. Can be NONE, FLUSH or FSYNC, if nothing is set FLUSH is the default.
+
+These configuration options work in the following way:
+
+* FSYNC: Solr internal buffer is explicitly flushed to the underlying, file system specific buffer which is also flushed to the transaction log file. This is a more expensive operation but safer since the content is written to the transaction log file.
+* FLUSH: We only flush explicitly the Solr internal buffer to the underlying, file system specific buffer, but this buffer is not explicitly flushed to the transaction log file. This is less expensive but also less safe since if we have a crash before the file system specific buffer is also flushed, data from it is lost.
+* NONE: There is no explicit flush of the buffers. This configuration option is the least expensive, but the least safe as well.
+
An example, to be included under `<updateHandler>` in `solrconfig.xml`, employing the above advanced settings:
[source,xml]
@@ -288,6 +303,7 @@ An example, to be included under `<updateHandler>` in `solrconfig.xml`, employin
<int name="numRecordsToKeep">500</int>
<int name="maxNumLogsToKeep">20</int>
<int name="numVersionBuckets">65536</int>
+ <str name="syncLevel">FSYNC</str>
</updateLog>
----