Logs about used node in Pool's errors #51

Closed
opened 2023-04-13 10:59:56 +00:00 by carpawell · 4 comments
Collaborator

Currently, pool just returns an error with text message and without a node that returned that error.

I think it can:

  1. Return node's endpoint via message;
  2. Log errors with debug using internal logger;
  3. ...

Will simplify debug a little. E.g. in the morph multiclient I tried to log as much internal uncontrolable processes as I can.

@dkirillov, @alexvanin

Currently, pool just [returns](https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/src/commit/f41860f9bd41368d5ddedeb9ed535fcfe97c0fa3/pool/pool.go#L818) an error with text message and _without_ a node that returned that error. I think it can: 1. Return node's endpoint via message; 2. Log errors with `debug` using internal [logger](https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/src/commit/f41860f9bd41368d5ddedeb9ed535fcfe97c0fa3/pool/pool.go#L1563); 3. ... Will simplify debug a little. E.g. in the morph multiclient I tried to [log](https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/01c0c90a869ef9f77ed412bd5a26c539579dacf7/pkg/morph/client/multi.go#L47-L58) as much internal uncontrolable processes as I can. @dkirillov, @alexvanin
carpawell added the
question
label 2023-04-13 10:59:56 +00:00
fyrchik added the
pool
label 2023-05-02 07:56:56 +00:00
snegurochka added the
discussion
enhancement
labels 2023-05-03 17:15:15 +00:00
alexvanin self-assigned this 2023-06-01 06:50:53 +00:00
alexvanin removed their assignment 2023-06-01 06:51:01 +00:00
alexvanin self-assigned this 2023-06-01 06:51:08 +00:00

Let's go further and add a metric that returns current endpoint pool is talking to.

Let's go further and add a metric that returns current endpoint pool is talking to.
ironbee was assigned by alexvanin 2023-06-09 10:14:54 +00:00
alexvanin removed their assignment 2023-06-09 10:14:59 +00:00
Collaborator

We should also pass logger to the wrapper:

prm.logger = params.logger

or add methods to set logger and use it

We should also pass logger to the [wrapper](https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/src/commit/aa8ffebc632840847215a39bfe69d64ad9571bf6/pool/pool.go#L1746): ``` prm.logger = params.logger ``` or add methods to set logger and use it

Summary:

  • issue is related for object pool, not tree pool,
  • in case of the error, pool should wrap endpoint address of the storage node before passing error to the caller,
  • add a metric to provide endpoint of current storage node which pool is connected to,
  • provide a way to pass logger to the wrapper.
Summary: - issue is related for _object_ pool, not _tree_ pool, - in case of the error, `pool` should wrap endpoint address of the storage node before passing error to the caller, - add a [metric](https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/src/branch/master/pool/statistic.go) to provide endpoint of current storage node which `pool` is connected to, - provide a way to pass logger to the [wrapper](https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/src/commit/aa8ffebc632840847215a39bfe69d64ad9571bf6/pool/pool.go#L1746).

From my POV we should have 2 metrics:

  • first for storage pool: show current healthy endpoints with the same priority
  • second for tree pool: current connected endpoint
From my POV we should have 2 metrics: - first for storage pool: show current healthy endpoints with the same priority - second for tree pool: current connected endpoint
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-sdk-go#51
There is no content yet.