Skip to content

Fix redundant lock taking during create multi timeseries#12487

Merged
Beyyes merged 1 commit intoapache:masterfrom
MarcosZyk:fix-lock-maximum
May 8, 2024
Merged

Fix redundant lock taking during create multi timeseries#12487
Beyyes merged 1 commit intoapache:masterfrom
MarcosZyk:fix-lock-maximum

Conversation

@MarcosZyk
Copy link
Contributor

@MarcosZyk MarcosZyk commented May 8, 2024

Description

Problem

image

Cause

The original implementation caused repeating lock taking for all given devices when checking template compatibility for multi timeseries creation. Therefore, if the count of devices in one creation request exceeds 65535, the state count in ReentrantReadWriteLock will overflow, causing the error shown in the picture.

Solution

Make the lock taking only execute once when creating multi timeseries.

Copy link
Member

@Beyyes Beyyes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Beyyes Beyyes merged commit 3782215 into apache:master May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants