Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Clean up idx/memory namespace by moving components into their own packages #1535

Closed
replay opened this issue Nov 15, 2019 · 5 comments
Closed
Assignees
Labels

Comments

@replay
Copy link
Contributor

replay commented Nov 15, 2019

We currently have a lot of independent components mixed together in the idx/memory package. This leads to quite a lot of unnecessary namespace pollution in the index package. It should be simple to move many of these components into their own packages.
There could be a hierarchy like

  • idx/memory/tags
  • idx/memory/tags/metaTags
  • idx/memory/tags/metaTags/enricher
  • idx/memory/tags/metaTags/metaRecords
  • idx/memory/tags/metaTags/metaTagIndex
@replay replay added this to the sprint-4 milestone Nov 15, 2019
@replay replay self-assigned this Nov 15, 2019
@Dieterbe
Copy link
Contributor

good luck 😎

@Dieterbe
Copy link
Contributor

looking at https://godoc.org/github.com/grafana/metrictank/idx/memory , it actually looks quite reasonable to me. but this only shows public types.
grepping in idx/memory, i see 28 types declared (public+private)
looking at https://godoc.org/net/http for inspiration, I note that they also have many things related to http together in one package (e.g. servemux, client, request, response, ...)
net/http has 48 .go files, idx/memory has only 20.

Perhaps we could reorganize the code a bit, but i don't see a big problem here.

@Dieterbe
Copy link
Contributor

related: #1510

@replay
Copy link
Contributor Author

replay commented Nov 18, 2019

If we don't break it up into small sub-packages, we should at least re-organize the tests a bit because at the moment they're kind of messy and all mixed together. I think this could be improved by moving them into specific files where each file has a defined purpose.

@replay replay modified the milestones: sprint-4, sprint-5 Nov 18, 2019
@robert-milan robert-milan modified the milestones: sprint-5, sprint-6 Dec 9, 2019
@fkaleo fkaleo removed this from the sprint-6 milestone Jan 6, 2020
@stale
Copy link

stale bot commented Apr 5, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 5, 2020
@stale stale bot closed this as completed Apr 12, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants