Skip to content

Commit 332d698

Browse files
authored
[Event Hubs] Warning message tuning (Azure#31656)
* [Event Hubs] Warning message tuning Tweaking text for warnings emitted to the error handler to clarify that they are warnings and not hard errors. Adding more context to the processor warning about too many partitions owned to indicate that it can be ignored if not experiencing issues. * Update sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Resources.resx * Update sdk/eventhub/Azure.Messaging.EventHubs/src/Diagnostics/EventHubsEventSource.cs
1 parent b5dbf3e commit 332d698

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Resources.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Resources.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@
319319
<value>This handler cannot be changed after an event has been enqueued; closing or disposing the producer will unregister any current hander.</value>
320320
</data>
321321
<data name="ProcessorLoadBalancingCycleSlowMask" xml:space="preserve">
322-
<value>A load balancing cycle has taken too long to complete. A slow cycle can cause stability issues with partition ownership. Consider investigating storage latency and thread pool health. Common causes are soft delete being enabled for storage and too many partitions owned. You may also want to consider increasing the 'PartitionOwnershipExpirationInterval' in the processor options. Cycle Duration: '{0:0.00}' seconds. Partition Ownership Interval '{1:0:00}' seconds.</value>
322+
<value>WARNING: A load balancing cycle has taken too long to complete. A slow cycle can cause stability issues with partition ownership. Consider investigating storage latency and thread pool health. Common causes are soft delete being enabled for storage and too many partitions owned. You may also want to consider increasing the 'PartitionOwnershipExpirationInterval' in the processor options. Cycle Duration: '{0:0.00}' seconds. Partition Ownership Interval '{1:0:00}' seconds.</value>
323323
</data>
324324
<data name="CannotEnqueueEventWithoutHandler" xml:space="preserve">
325325
<value>Events cannot be enqueued for processing without the '{0}' handler set.</value>
@@ -337,7 +337,7 @@
337337
<value>Executing developer-provided code to process events.</value>
338338
</data>
339339
<data name="ProcessorLoadBalancingIntervalsTooCloseMask" xml:space="preserve">
340-
<value>The 'PartitionOwnershipExpirationInterval' and 'LoadBalancingUpdateInterval' are configured for intervals that may cause stability issues with partition ownership. It is recommended that the 'PartitionOwnershipExpirationInterval' be at least 3 times greater than the 'LoadBalancingUpdateInterval' and very strongly advised that it should be no less than twice as long. When these intervals are too close together, ownership may expire before it is renewed during load balancing which will cause partitions to migrate. Consider adjusting the intervals in the processor options if you experience issues. Load Balancing Interval '{0:0:00}' seconds. Partition Ownership Interval '{1:0:00}' seconds.</value>
340+
<value>WARNING: The 'PartitionOwnershipExpirationInterval' and 'LoadBalancingUpdateInterval' are configured for intervals that may cause stability issues with partition ownership. It is recommended that the 'PartitionOwnershipExpirationInterval' be at least 3 times greater than the 'LoadBalancingUpdateInterval' and very strongly advised that it should be no less than twice as long. When these intervals are too close together, ownership may expire before it is renewed during load balancing which will cause partitions to migrate. Consider adjusting the intervals in the processor options if you experience issues. Load Balancing Interval '{0:0:00}' seconds. Partition Ownership Interval '{1:0:00}' seconds.</value>
341341
</data>
342342
<data name="TroubleshootingGuideLink" xml:space="preserve">
343343
<value>For troubleshooting information, see https://aka.ms/azsdk/net/eventhubs/exceptions/troubleshoot</value>

sdk/eventhub/Azure.Messaging.EventHubs/src/Diagnostics/EventHubsEventSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2118,7 +2118,7 @@ public virtual void EventProcessorLoadBalancingCycleSlowWarning(string identifie
21182118
/// <param name="ownedPartitionCount">The number of partitions owned.</param>
21192119
/// <param name="maximumAdvisedCount">The maximum number of partitions that are advised for this processor instance.</param>
21202120
///
2121-
[Event(104, Level = EventLevel.Warning, Message = "The processor instance with identifier '{0}' for Event Hub: {1} owns a higher than recommended number of partitions for average workloads. Owning too many partitions can cause slow performance and stability issues. Consider monitoring performance and partition ownership stability to ensure that they meet expectations. If not, adding processors to the group may help. Total partition count: '{2}'. Owned partition count: '{3}'. Maximum recommended partitions owned: '{4}'. {5}")]
2121+
[Event(104, Level = EventLevel.Warning, Message = "The processor instance with identifier '{0}' for Event Hub: {1} owns a higher than recommended number of partitions for average workloads. Owning too many partitions may cause slow performance and stability issues. Consider monitoring performance and partition ownership stability to ensure that they meet expectations. If not, adding processors to the group may help. Total partition count: '{2}'. Owned partition count: '{3}'. Maximum recommended partitions owned: '{4}'. This warning is based on a general heuristic that will differ between applications. If you are not experiencing issues, this warning is safe to ignore. {5}")]
21222122
public virtual void EventProcessorHighPartitionOwnershipWarning(string identifier,
21232123
string eventHubName,
21242124
int totalPartitionCount,

0 commit comments

Comments
 (0)