-
Notifications
You must be signed in to change notification settings - Fork 4k
mmaprototype: introduce and adopt mmaload package #157816
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
base: master
Are you sure you want to change the base?
Conversation
1eed891 to
15018e1
Compare
I want to avoid footguns related to negative load values. Having a package for
the load primitives allows hiding the naked slice, so that use from the
mmaprototype package can be enforced to be automatically correct.
This first commit creates the package and moves the LoadValue LoadVector types.
It also creates a SignledLoad{Value,Vector} type that will be adopted as
representation for the adjusted load (which can become negative).
This commit doesn't yet have great comments on the new types and methods.
They're added in a follow-up commit in the same PR - please take a look
at the entire diff first if definitions here are unclear. Sorry about
that - I wasn't able to easily reorder the commits after the fact.
Epic: CRDB-55052
This required an update to and thus review of all arithmetic involving this type (which was part of the point of doing this). A few TODOs were added, and I took the opportunity to refactor the max pending frac computation, which is now much simpler. I'm tracking writing the unit test in cockroachdb#157757. No AI in this workstream so far. Epic: CRDB-55052.
15018e1 to
19fc940
Compare
|
Need to take a step back here. As of this PR, |
Potential Bug(s) DetectedThe three-stage Claude Code analysis has identified potential bug(s) in this PR that may warrant investigation. Next Steps: Note: When viewing the workflow output, scroll to the bottom to find the Final Analysis Summary. After you review the findings, please tag the issue as follows:
|
This introduces a SignedLoadVector which hides its underlying elements (primarly from the mmaprototype package). Load value arithmetic that could become negative now needs to go through helpers that make it difficult to "forget" that negative values can occur.
This isn't 100% yet, but it's a start.
Informs #157757.
Epic: CRDB-55052