Move connection management from Pool
to ConnectionManager
#300
Labels
No labels
P0
P1
P2
P3
good first issue
pool
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-sdk-go#300
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
Pool
has mixed responsibilities. It handles bothFrostFS
operations and connection management (like health checks and work withinnerPool
).Create
ConnectionManager
and move connection management toConnectionManager
. This is needed for #30.It would be nice to see high level overview of proposed changes (in go or pseudo code) before starting developing.
In general I like idea of simplifying
Pool
By the way, we had #204. Why don't we implement this idea there?
Because it is already too big and old.
I would rather first see the proposed changes, as you also suggested.
I propose the following structure:
@achuprov could you also describe what are the responsibilities of each struct and what methods do they have.
It is not obvious rn.
@fyrchik The
Pool
will still includeDeal
,Close
, and all the currently public methods.The
ConnectionManager
will provide methods likeDea
l,Close
, as well asconnection()
,Statistic()
, and all the helper methods used in thePool
, such ascheckSessionTokenErr
,initCallContext
,openDefaultSession
,call
,fillAppropriateKey
, and others.Additionally, I suggest moving the logic for managing goroutines into
HealthCheck
. It will handle checking the health of clients in theinnerPool
using a callback function.I don’t intend to drastically refactor the structure of the code—I simply want to separate the relevant logic into specific components