Skip to content

pool: adding new logger flom lib slog in pool #555

Open
babyTsakhes wants to merge 3 commits intomasterfrom
babyTsakhes/gh-504-change-logger-for-pool-Slogger-task
Open

pool: adding new logger flom lib slog in pool #555
babyTsakhes wants to merge 3 commits intomasterfrom
babyTsakhes/gh-504-change-logger-for-pool-Slogger-task

Conversation

@babyTsakhes
Copy link
Copy Markdown
Collaborator

This task from task #504 - I adding new Slogger in pool for refactoring code and integrating new logger in all code in pool.

We have used the slog library, and now the messages are more informative.

Closes #504
@babyTsakhes babyTsakhes changed the title pool: adding new Slogger in pool pool: adding new logger flom lib slog in pool Mar 30, 2026
@babyTsakhes babyTsakhes force-pushed the babyTsakhes/gh-504-change-logger-for-pool-Slogger-task branch from 515813b to db34939 Compare April 2, 2026 08:23
@babyTsakhes
Copy link
Copy Markdown
Collaborator Author

Perhaps this task is completed.

@babyTsakhes babyTsakhes force-pushed the babyTsakhes/gh-504-change-logger-for-pool-Slogger-task branch from 7da21d7 to d1864d4 Compare April 2, 2026 10:46
@babyTsakhes babyTsakhes marked this pull request as ready for review April 2, 2026 10:48
@babyTsakhes
Copy link
Copy Markdown
Collaborator Author

func (p *ConnectionPool) deleteConnection(name string) {
conn := p.anyPool.DeleteConnection(name)
p.rwPool.DeleteConnection(name)
p.roPool.DeleteConnection(name)
if conn != nil {
// The internal connection deinitialization.
p.watcherContainer.mutex.RLock()
defer p.watcherContainer.mutex.RUnlock()
_ = p.watcherContainer.foreach(func(watcher *poolWatcher) error {
watcher.unwatch(conn)
return nil
})
}
}

@babyTsakhes
Copy link
Copy Markdown
Collaborator Author

2026-04-02T08:28:45.3309500Z === RUN TestConnectionHandlerOpenError
2026-04-02T08:28:45.3410720Z 2026/04/02 08:28:45 INFO Connected to Tarantool component=tarantool.connection event_time=2026-04-02T08:28:45.286Z event=connected addr=127.0.0.1:3014 connection_state=connected request_timeout=5s
2026-04-02T08:28:45.3500270Z 2026/04/02 08:28:45 INFO Connected to Tarantool component=tarantool.connection event_time=2026-04-02T08:28:45.286Z event=connected addr=127.0.0.1:3013 connection_state=connected request_timeout=5s
2026-04-02T08:28:45.3600270Z 2026/04/02 08:28:45 WARN storing connection canceled name=127.0.0.1:3014 error="any error"
2026-04-02T08:28:45.3617910Z 2026/04/02 08:28:45 INFO Connection closed component=tarantool.connection event_time=2026-04-02T08:28:45.291Z event=closed addr=127.0.0.1:3014 connection_state=closed request_timeout=5s
2026-04-02T08:28:45.3640320Z 2026/04/02 08:28:45 WARN connect to instance failed name=127.0.0.1:3014 error="storing connection canceled"
2026-04-02T08:28:45.3720500Z 2026/04/02 08:28:45 WARN storing connection canceled name=127.0.0.1:3013 error="any error"
2026-04-02T08:28:45.3755360Z 2026/04/02 08:28:45 INFO Connection closed component=tarantool.connection event_time=2026-04-02T08:28:45.292Z event=closed addr=127.0.0.1:3013 connection_state=closed request_timeout=5s
2026-04-02T08:28:45.3758820Z 2026/04/02 08:28:45 WARN connect to instance failed name=127.0.0.1:3013 error="storing connection canceled"
2026-04-02T08:28:45.3776250Z --- PASS: TestConnectionHandlerOpenError (0.01s)
2026-04-02T08:28:45.3802420Z === RUN TestConnectionHandlerUpdateError
2026-04-02T08:28:45.3811160Z 2026/04/02 08:28:45 INFO Connected to Tarantool component=tarantool.connection event_time=2026-04-02T08:28:45.294Z event=connected addr=127.0.0.1:3013 connection_state=connected request_timeout=5s
2026-04-02T08:28:45.3817730Z 2026/04/02 08:28:45 INFO Connected to Tarantool component=tarantool.connection event_time=2026-04-02T08:28:45.294Z event=connected addr=127.0.0.1:3014 connection_state=connected request_timeout=5s
2026-04-02T08:28:45.3819460Z 2026/04/02 08:28:45 INFO Connection closed component=tarantool.connection event_time=2026-04-02T08:28:45.321Z event=closed addr=127.0.0.1:3013 connection_state=closed request_timeout=5s
2026-04-02T08:28:45.3838740Z 2026/04/02 08:28:45 INFO Connection closed component=tarantool.connection event_time=2026-04-02T08:28:45.321Z event=closed addr=127.0.0.1:3014 connection_state=closed request_timeout=5s
2026-04-02T08:28:45.3841350Z 2026/04/02 08:28:45 INFO Connected to Tarantool component=tarantool.connection event_time=2026-04-02T08:28:45.322Z event=connected addr=127.0.0.1:3013 connection_state=connected request_timeout=5s
2026-04-02T08:28:45.3847070Z 2026/04/02 08:28:45 WARN connect to instance failed name=127.0.0.1:3014 error="failed to dial: dial tcp 127.0.0.1:3014: operation was canceled"
2026-04-02T08:28:45.3847920Z 2026/04/02 08:28:45 WARN storing connection canceled name=127.0.0.1:3013 error="any error"
2026-04-02T08:28:45.3848890Z 2026/04/02 08:28:45 INFO Connection closed component=tarantool.connection event_time=2026-04-02T08:28:45.332Z event=closed addr=127.0.0.1:3013 connection_state=closed request_timeout=5s
2026-04-02T08:28:45.3849750Z connection_pool_test.go:1298:
2026-04-02T08:28:45.3850660Z Error Trace: /Users/runner/work/go-tarantool/go-tarantool/tarantool/go-tarantool/pool/connection_pool_test.go:1298
2026-04-02T08:28:45.3851720Z Error: Expected nil, but got: tarantool.ClientError{Code:0x4001, Msg:"connection closed by client"}
2026-04-02T08:28:45.3852410Z Test: TestConnectionHandlerUpdateError
2026-04-02T08:28:45.3852820Z Messages: failed to make ro
2026-04-02T08:28:45.3853220Z 2026/04/02 08:28:45 ERROR reopen connection failed name=127.0.0.1:3013 error="pool is closed"
2026-04-02T08:28:45.3853780Z 2026/04/02 08:28:45 ERROR reopen connection failed name=127.0.0.1:3014 error="pool is closed"
2026-04-02T08:28:45.3854150Z --- FAIL: TestConnectionHandlerUpdateError (0.04s)

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.

1 participant