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

Static data 4: static-aware Rust SDK #5540

Merged
merged 5 commits into from
Apr 5, 2024
Merged

Static data 4: static-aware Rust SDK #5540

merged 5 commits into from
Apr 5, 2024

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Mar 15, 2024

Just exposing all the new static stuff to the Rust SDK, and trying to kill the "timeless" terminology in the process.


Part of a PR series that removes the concept of timeless data in favor of the much simpler concept of static data:

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

@teh-cmc teh-cmc force-pushed the cmc/static_1_store branch from 6f14a59 to e23c89a Compare March 15, 2024 16:52
@teh-cmc teh-cmc force-pushed the cmc/static_4_sdk_rust branch from b1d32ce to a8e92a2 Compare March 15, 2024 17:08
@teh-cmc teh-cmc force-pushed the cmc/static_1_store branch 2 times, most recently from 42c201b to 5b699f2 Compare March 18, 2024 10:05
@teh-cmc teh-cmc force-pushed the cmc/static_4_sdk_rust branch from a8e92a2 to 7d6f772 Compare March 18, 2024 10:28
@teh-cmc teh-cmc changed the base branch from cmc/static_1_store to cmc/static_3_sdk_cpp March 18, 2024 10:29
@teh-cmc teh-cmc marked this pull request as ready for review March 18, 2024 10:38
@teh-cmc teh-cmc force-pushed the cmc/static_3_sdk_cpp branch from b86592f to 7d9e4be Compare March 19, 2024 16:29
@teh-cmc teh-cmc force-pushed the cmc/static_4_sdk_rust branch from 99b7b10 to c2c5955 Compare March 19, 2024 16:31
crates/re_data_source/src/data_loader/mod.rs Outdated Show resolved Hide resolved
crates/re_sdk/src/recording_stream.rs Outdated Show resolved Hide resolved
@teh-cmc teh-cmc removed the do-not-merge Do not merge this PR label Apr 5, 2024
teh-cmc added a commit that referenced this pull request Apr 5, 2024
_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
teh-cmc added a commit that referenced this pull request Apr 5, 2024
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.

- Fixes #5264
- Fixes #2074
- Fixes #5447
- Fixes #1766


---

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
teh-cmc added a commit that referenced this pull request Apr 5, 2024
Just exposing all the new static stuff to the Python SDK, and trying to
kill the "timeless" terminology in the process.

---

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
@teh-cmc teh-cmc force-pushed the cmc/static_3_sdk_cpp branch from 7d9e4be to 1aceb67 Compare April 5, 2024 15:26
Base automatically changed from cmc/static_3_sdk_cpp to main April 5, 2024 15:29
teh-cmc added a commit that referenced this pull request Apr 5, 2024
Just exposing all the new static stuff to the C & C++ SDKs, and trying
to kill the "timeless" terminology in the process.

---

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
@teh-cmc teh-cmc force-pushed the cmc/static_4_sdk_rust branch from c2c5955 to 7bbc2a5 Compare April 5, 2024 15:30
@teh-cmc teh-cmc merged commit acf32fe into main Apr 5, 2024
39 checks passed
@teh-cmc teh-cmc deleted the cmc/static_4_sdk_rust branch April 5, 2024 15:59
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