Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(logging): Add startup logging for shard counts #25378

Open
wants to merge 13 commits into
base: master-1.x
Choose a base branch
from

Conversation

devanbenz
Copy link

@devanbenz devanbenz commented Sep 20, 2024

This PR adds a check to see how many shards are remaining
vs how many shards are opened as well as the percentage.

closes https://github.com/influxdata/feature-requests/issues/476

@devanbenz devanbenz changed the title feat(logging): WIP beginning building out the structure for startup feat(logging): Add startup logging for shard counts Sep 23, 2024
@devanbenz devanbenz marked this pull request as ready for review September 23, 2024 14:20
@devanbenz devanbenz self-assigned this Sep 23, 2024
@devanbenz devanbenz marked this pull request as draft September 23, 2024 16:41
tsdb/store.go Outdated Show resolved Hide resolved
tsdb/store.go Outdated Show resolved Hide resolved
@gwossum
Copy link
Member

gwossum commented Sep 23, 2024

@devanbenz @davidby-influx I have some hard numbers to put behind my claim that scanning all the directories and files and then scanning them again doesn't take much longer than scanning them once. On my 3.5 year old Influx laptop, there are ~3.5 million files in my home directory. Scanning all of them cold after dropping all the disk caches takes about 50 seconds. Scanning a second time with the cache hot only takes 4 seconds. So scanning them twice only adds 8% beyond scanning them one time.

@devanbenz devanbenz marked this pull request as ready for review September 23, 2024 22:11
@devanbenz
Copy link
Author

devanbenz commented Sep 23, 2024

@gwossum this is ready now, I was thinking I could set up a test suite entry for maybe 0 shards and then it hitting an error to show that the uint64 doesn't go below 0 per the checks I have in the interface but idk if I should take the time to wire that up seems like a lot of test boilerplate I need to create for it. I will also squash the commits and have a single descriptive commit later.

This PR adds a check to see how many shards are remaining
vs how many shards are opened as well as the percentage.

closes influxdata/feature-requests#476
This PR adds a check to see how many shards are remaining
vs how many shards are opened as well as the percentage.

closes influxdata/feature-requests#476
cmd/influxd/run/server.go Outdated Show resolved Hide resolved
tsdb/load_shards.go Outdated Show resolved Hide resolved
tsdb/load_shards.go Outdated Show resolved Hide resolved
tsdb/store_test.go Outdated Show resolved Hide resolved
tsdb/store_test.go Outdated Show resolved Hide resolved
tsdb/store_test.go Outdated Show resolved Hide resolved
tsdb/load_shards.go Outdated Show resolved Hide resolved
@devanbenz devanbenz requested a review from gwossum October 4, 2024 14:22
tsdb/store.go Outdated Show resolved Hide resolved
tsdb/store.go Outdated Show resolved Hide resolved
tsdb/store_test.go Outdated Show resolved Hide resolved
tsdb/store_test.go Outdated Show resolved Hide resolved
@devanbenz
Copy link
Author

@gwossum I've modified my store_test code to include the changes that you established to fix the additional shard problem. The scaffolding is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants