This repository was archived by the owner on Aug 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 107
remove deprecated "safety feature" in CassandraIdx #877
Comments
heh i totally missed the that said, probably still makes sense to remove that code now, as we shouldn't need it. |
lets get rid of this. We definitely dont need it anymore. |
i'll do this as part of #876 |
Dieterbe
added a commit
that referenced
this issue
Mar 19, 2018
Dieterbe
added a commit
that referenced
this issue
Mar 21, 2018
Dieterbe
added a commit
that referenced
this issue
Mar 22, 2018
Dieterbe
added a commit
that referenced
this issue
Mar 30, 2018
Dieterbe
added a commit
that referenced
this issue
Mar 30, 2018
Dieterbe
added a commit
that referenced
this issue
Apr 10, 2018
merged |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
in #574 we introduced these lines:
as per update idx handling #574 (comment)
this was only temporary, and can be removed (note that the problem we saw originally was on the Nodes attribute of the MetricDefinition which we no longer use)
it doesn't work as you would expect because memoryIdx.AddOrUpdate()
returns a copy of the Archive (both in the case of new->added, and update scenario)
so any changes won't be seen by the memory index
see https://play.golang.org/p/mF5hFkVD8_C
the exception being the tags slice, if you don't update the slice you have access to the underlying array and can change it:
https://play.golang.org/p/y4EqMLAaFxg
so the only protection that code gives is if somehow the tags within the backing array get altered.
(not when the tags slice gets overridden by a slice with different array, or a capacity-extended slice)
we have no reason to believe we have such a bug, making this code removeable
on the other hand, if we have precisely such a tag-array bug, this would expose it. we should do a sanity check of the index code before removing this.
The text was updated successfully, but these errors were encountered: