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

bug: Unnecessary sessions closing #1607

Closed
rekby opened this issue Jan 15, 2025 · 0 comments · Fixed by #1608
Closed

bug: Unnecessary sessions closing #1607

rekby opened this issue Jan 15, 2025 · 0 comments · Fixed by #1608
Labels
bug Something isn't working query-service

Comments

@rekby
Copy link
Member

rekby commented Jan 15, 2025

Bug Report

YDB GO SDK version: 3.95.6

Current behavior: mark session as error (and then close) for any error from uses callback.

Expected behavior:
Mark session as error for cluster errors only

Example:

the code close session after error about no expected rows and will use two sessions for the two queries instead on one.

	must0(db.Table().Do(ctx, func(ctx context.Context, s table.Session) error {
		_ = s.DropTable(ctx, "/local/t")
		return s.ExecuteSchemeQuery(ctx, `CREATE TABLE t (id Int64, PRIMARY KEY (id))`)
	}))
	_, _ = db.Query().QueryRow(ctx, `SELECT * FROM t`)
	_, _ = db.Query().QueryRow(ctx, `SELECT * FROM t`)
@rekby rekby added bug Something isn't working query-service labels Jan 15, 2025
@rekby rekby linked a pull request Jan 15, 2025 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working query-service
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant