Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ES-1314123] race condition for memorize tsdb client #108

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

jnyi
Copy link
Collaborator

@jnyi jnyi commented Nov 23, 2024

Revert thanos-io#7782

Also submit one to OSS: thanos-io#7941

Add this to test TestMultiTSDBAddNewTenant would fail in current OSS code:


	concurrency := 100
	var wg sync.WaitGroup
	for i := 0; i < concurrency; i++ {
		wg.Add(1)
		go func(i int) {
			defer wg.Done()
			testutil.Ok(t, appendSample(m, fmt.Sprintf("tenant-%d", i), time.UnixMilli(int64(10))))
		}(i)
                 go func() {
			m.TSDBLocalClients()
		}()
	}
	wg.Wait()
	testutil.Equals(t, 1+concurrency, len(m.TSDBLocalClients()))
  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Verification

@jnyi jnyi requested review from hczhu-db and yuchen-db November 23, 2024 02:22
Copy link

@yuchen-db yuchen-db left a comment

Choose a reason for hiding this comment

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

great work! thanks

@jnyi jnyi force-pushed the new-tenant-missing branch 2 times, most recently from 7abfdf9 to 35acb93 Compare November 25, 2024 17:47
@jnyi jnyi force-pushed the new-tenant-missing branch from 35acb93 to ea908b1 Compare November 25, 2024 19:13
@jnyi jnyi merged commit 1c69c7e into databricks:db_main Nov 25, 2024
14 checks passed
@jnyi jnyi deleted the new-tenant-missing branch November 25, 2024 19:29
@jnyi jnyi mentioned this pull request Dec 2, 2024
2 tasks
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.

3 participants