Package org.apache.solr.update
Class PeerSync
java.lang.Object
org.apache.solr.update.PeerSync
- All Implemented Interfaces:
AutoCloseable,SolrMetricProducer
This class is useful for performing peer to peer synchronization of recently indexed update
commands during recovery process.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHelper class for doing comparison ourUpdates and other replicas's updates to find the updates that we missedstatic classResult ofPeerSync.MissedUpdatesFinderstatic class -
Field Summary
FieldsFields inherited from interface org.apache.solr.metrics.SolrMetricProducer
CATEGORY_ATTR, HANDLER_ATTR, NAME_ATTR, OPERATION_ATTR, PLUGIN_NAME_ATTR, RESULT_ATTR, TYPE_ATTR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionImplementations should return the context used inSolrMetricProducer.initializeMetrics(SolrMetricsContext, Attributes)to ensure proper cleanup of metrics at the end of the life-cycle of this component.voidinitializeMetrics(SolrMetricsContext parentContext, io.opentelemetry.api.common.Attributes attributes) Implementation should initialize all metrics to aSolrMetricsContextRegistry/MeterProvider withAttributesas the common set of attributes that will be attached to every metric that is initialized for that class/componentstatic longpercentile(List<Long> arr, float frac) sync()Returns true if peer sync was successful, meaning that this core may be considered to have the latest updates.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.solr.metrics.SolrMetricProducer
close
-
Field Details
-
absComparator
-
METRIC_SCOPE
- See Also:
-
-
Constructor Details
-
PeerSync
-
PeerSync
-
-
Method Details
-
getSolrMetricsContext
Description copied from interface:SolrMetricProducerImplementations should return the context used inSolrMetricProducer.initializeMetrics(SolrMetricsContext, Attributes)to ensure proper cleanup of metrics at the end of the life-cycle of this component. This should be the child context if one was created, or null if the parent context was used.- Specified by:
getSolrMetricsContextin interfaceSolrMetricProducer
-
initializeMetrics
public void initializeMetrics(SolrMetricsContext parentContext, io.opentelemetry.api.common.Attributes attributes) Description copied from interface:SolrMetricProducerImplementation should initialize all metrics to aSolrMetricsContextRegistry/MeterProvider withAttributesas the common set of attributes that will be attached to every metric that is initialized for that class/component- Specified by:
initializeMetricsin interfaceSolrMetricProducer- Parameters:
parentContext- The registry that the component will initialize metrics toattributes- Base set of attributes that will be bound to all metrics for that component
-
percentile
-
sync
Returns true if peer sync was successful, meaning that this core may be considered to have the latest updates. It does not mean that the remote replica is in sync with us.
-