Skip to content

Conversation

@guillaumemichel
Copy link
Collaborator

As discussed, we don't want to track timestamp for every provided multihash, since it adds a lot of overhead. Moreover, the feature would only benefit a small number of users, but all users need to pay the price of logging timestamps.

  • Removed the ProvideStatus command (scaffold)
  • Logged multihashes that were just provided to DEBUG so that users are able to know which multihashes were provided (with timestamp) if necessary.

cc: @gammazero @lidel

@guillaumemichel guillaumemichel requested a review from a team as a code owner September 24, 2025 11:56
use Debugw with count field first, calculate len once
@lidel lidel changed the title remove provider status command refactor: remove provider status command Sep 25, 2025
@lidel lidel self-assigned this Sep 25, 2025
add batchProvide entry log with prefix and count
log sent records after successful sendProviderRecords
put prefix first in all provider logs
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, added log for single provider as well

merging once CI is greeen, we will see how this behaves in RC2

@lidel lidel merged commit 1386e98 into master Sep 26, 2025
9 checks passed
@lidel lidel deleted the provider-cid-status branch September 26, 2025 16:17
s.provideCounter.Add(s.ctx, int64(len(allKeys)))
keyCount := len(allKeys)
s.provideCounter.Add(s.ctx, int64(keyCount))
logger.Debugw("sent provider records", "prefix", r.Prefix, "count", keyCount, "keys", allKeys)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 this can get pretty hardcore in debug level, 10748 keys in one line:

2025-09-27T03:35:58.329Z	DEBUG	dht/provider	provider/provider.go:1336	sent provider records	{"prefix": "01001101", "count": 10748, "keys": ["EiB9gQIoN[...]

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.

3 participants