-
Notifications
You must be signed in to change notification settings - Fork 373
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
Static data 1: static-aware datastore, caches and queries #5535
Conversation
8fd761d
to
2bd5760
Compare
6f14a59
to
e23c89a
Compare
2bd5760
to
f338850
Compare
821d2b5
to
42c201b
Compare
/// If enabled, the store will throw an error if and when it notices that a single component | ||
/// type maps to more than one arrow datatype. | ||
/// | ||
/// Enabled by default in debug builds. | ||
pub enable_typecheck: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing in anticipation of promises.
42c201b
to
5b699f2
Compare
30eed52
to
ca6dfca
Compare
0f896b9
to
5af06be
Compare
@@ -6,6 +6,8 @@ use crate::{DataStore, LatestAtQuery}; | |||
|
|||
// --- Read --- | |||
|
|||
// TODO(cmc): these helpers have got to go once the new APIs land. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add a issue number to this TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's already a PR open for it!
36f58cd
to
bd0c3d9
Compare
_Commits make no sense, review the final changelog directly._ _All the interesting bits happen in `re_log_types/time_point` & `re_sdk` -- everything else is just change propagation._ - `TimeInt` now ranges from `i64:MIN + 1` to `i64::MAX`. - `TimeInt::STATIC`, which takes the place of the now illegal `TimeInt(i64::MIN)`, is now _the only way_ of identifying static data. - It is impossible to create `TimeInt::STATIC` inadvertently -- users of the SDK cannot set the clock to that value. - Similarly, it is impossible to create a `TimeRange`, a `TimePoint`, a `LatestAtQuery` or a `RangeQuery` that includes `TimeInt::STATIC`. If static data exists, that's what will be returned, unconditionally -- there's no such thing as querying for it explicitely. - `TimePoint::timeless` is gone -- we already have `TimePoint::default` that we use all over the place, we don't need two ways of doing the same thing. There still exists a logical mapping between an empty `TimePoint` and static data, as that is how one represents static data on the wire -- terminology wise: "a timeless timepoint results in static data". Similar to the "ensure `RowId`s are unique" refactor from back when, this seemingly tiny change on the surface will vastly simplify downstream code that finally has some invariants to rely on. - Fixes #4832 - Related to #5264 --- Part of a PR series that removes the concept of timeless data in favor of the much simpler concept of static data: - #5534 - #5535 - #5536 - #5537 - #5540
5af06be
to
3a2d207
Compare
6dcaa7c
to
20d1082
Compare
// EntityTree should be empty again when we end since everything was GC'd | ||
assert_eq!(db.tree().num_children_and_fields(), 0); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@teh-cmc why was this test removed -- we were depending on this functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't quite remember -- probably a mistake, a lot of tests became redundant with each other as the model got vastly simplified
Introduces the concept of static data into the data APIs.
Static data is a on a per-entity per-component basis. If it exists, it unconditionally shadows any temporal data of the same type. It is never garbage collected.
When static data is returned, it is indicated via
TimeInt::STATIC
.The terminology has been normalized all over the place: data is either static or temporal, and nothing else.
Static data cannot have more than one cell per-entity per-component. Trying to write more than one cells will trigger last-write-wins semantics, as defined by
RowId
ordering.Timeless fallbacks just don't exist anymore, which simplifies out a lot of code in the datastore and query cache.
Note: static data is in many subtle ways incompatible with our legacy InstanceKey-based model, which results in a couple hacks in this PR. Those hacks will be gone as soon as the new data APIs land and instance keys go away.
log_tick
cannot coexist #2074Part of a PR series that removes the concept of timeless data in favor of the much simpler concept of static data:
TimeInt
#5534Checklist
main
build: app.rerun.ionightly
build: app.rerun.io