neofs-node
neofs-node copied to clipboard
Evaluate timeout CLI parameter against block time
So my point is: if it is possible to warn a user that some calls are useless by design, I would do it. About the rest, I am ok.
Originally posted by @notimetoname in https://github.com/nspcc-dev/neofs-node/issues/2135#issuecomment-1591240737
That's an additional delay for network settings request, but maybe it's worth doing for additional user convenience.
i think it maybe really useful when timeout defaults
with set --timeout
flag, i don't think additional request justifies itself: network resources are spent only for writing a warning. IMO it would be more efficient to attach such information to the response context along with the container ID (response X-header?). However, in this case it is useful to be able to let the server know whether the client plans to process this value or not (additional request X-header?)
if await {
req <- new(cid, "__NEOFS__ATTACH_POLL_INTEVAL")
} else {
req <- new(cid)
}
resp <- send(req)
if await {
interval <- get_header(resp, "__NEOFS__ATTACH_POLL_INTEVAL")
if interval == 0 {
interval <- 5s // some sane default recommended by the protocol
}
poll(cid, interval)
}
buuut these are protocol extensions