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: Last error value is lost #1571

Open
vitalyisaev2 opened this issue Nov 29, 2024 · 0 comments
Open

bug: Last error value is lost #1571

vitalyisaev2 opened this issue Nov 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@vitalyisaev2
Copy link
Member

Bug Report

YDB GO SDK version:

v3.92.5

Environment

Linux, x86_64

Current behavior:

I came across a temporary error in a service using YDB SDK. But the reason (%!w(<nil>)) is not clear from the logs:

2024-11-29T15:50:52.463+0300	ERROR	server/service_connector.go:172	request handling failed	
{
  "service": "connector", 
  "method": "ReadSplits", 
  "test_name": "",
  "data_source_kind": "YDB",
  "host": "ydb.serverless.yandexcloud.net",
  "port": 2135, 
  "database": "/ru-central1/b1g918jf99v96n47o7u6/etn348380t0sf4eb4r2o",
  "use_tls": true, 
  "protocol": "NATIVE", 
  "split_id": 0, 
  "error": "read split 0: run paging streamer: write data to stream: read result: query: query 'SELECT `number` FROM `lost_numbers`' error: query do: pool.With failed with 1 attempts: non-retryable error occurred on attempt No.1 (idempotent=true): failed to get item from pool after 100 attempts and 1m40.153382923s, pool has 0 items (0 busy, 0 idle, 0 create_in_progress): %!w(<nil>) at `github.com/ydb-platform/ydb-go-sdk/v3/internal/pool.(*Pool).getItem(pool.go:706)` at `github.com/ydb-platform/ydb-go-sdk/v3/internal/pool.(*Pool).try(pool.go:353)` at `github.com/ydb-platform/ydb-go-sdk/v3/internal/pool.(*Pool).With.func2(pool.go:390)` at `github.com/ydb-platform/ydb-go-sdk/v3/retry.Retry.func1(retry.go:264)` at `github.com/ydb-platform/ydb-go-sdk/v3/retry.opWithRecover(retry.go:418)` at `github.com/ydb-platform/ydb-go-sdk/v3/retry.RetryWithResult(retry.go:358)` at `github.com/ydb-platform/ydb-go-sdk/v3/retry.Retry(retry.go:270)` at `github.com/ydb-platform/ydb-go-sdk/v3/internal/pool.(*Pool).With(pool.go:396)` at `github.com/ydb-platform/ydb-go-sdk/v3/internal/query.do(client.go:218)`"
}

Expected behavior:

Wrapped error must be initialized.

Steps to reproduce:

No steps to reproduce.

Related code:

It turns out that the lastErr is not initialized in some edge cases.

@vitalyisaev2 vitalyisaev2 added the bug Something isn't working label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant