Commit Graph

26 Commits

Author SHA1 Message Date
Noa 619b8ce021 Bump Rust to 1.90 (#3397)
# Description of Changes

Necessary for pulling in rolldown.

# API and ABI breaking changes

None

# Expected complexity level and risk

1, with the caveat that this updates the Rust version and therefore
touches all the code.

# Testing

- [ ] Just the automated testing
2025-10-09 20:41:25 +00:00
Kim Altintop f394de32d9 Confirmed reads (#3133)
# Description of Changes

Implements [subscribing to durable
commits](https://github.com/clockworklabs/SpacetimeDBPrivate/issues/1594).

The setting works on a per-connection level, and essentially just delays
sending transaction updates until the transaction is reported as durable
by the database.

For connectionless SQL operations, the setting works per-request. No SQL
syntax is provided by this patch to toggle the configuration.

After some deliberation, I opted to obtain the offset when a transaction
commits (as opposed to when it starts). This creates some mild
inconvenience, because we prevent the transaction from committing until
the corresponding subscription updates are enqueued.
The strategy is, however, more correct should we ever support weaker
isolation levels, and it is easier to document.

Follow-ups include:

- Provide SQL syntax (`SET synchronous_commit = ON` or something)
- C# and TypeScript SDKs
- Reference docs?
 

# API and ABI breaking changes

Not breaking, but adds a parameter to the subscribe and sql endpoints.


# Expected complexity level and risk

4

To the author's understanding, ordering of outbound messages is not
changed by this patch, even if there are messages that don't have a
transaction offset (such as error messages). I.e. while waiting for the
transaction offset of a message to become durable, no message enqueued
after that message will be delivered. This may not be desirable in some
cases.

The patch may contain concurrency bugs, e.g. awaiting futures that may
never resolve.


# Testing

- [x] Implemented a new test in the `module_subscription_actor` module
- [x] Added unit tests for the core logic in `ClientConnectionReceiver` 

It would be desirable to also have integration-level tests, but I'm
currently unsure how to write those without being able to control if and
when the database reports an offset as durable.

---------

Signed-off-by: Kim Altintop <kim@eagain.io>
Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io>
2025-09-08 17:51:04 +00:00
Zeke Foppa f6f0909ea4 Update all licenses (#3002)
# Description of Changes

We recently merged several repos together. This PR clarifies the license
terms for several subdirectories, as well as the relationship between
the licenses.

The licenses in our subdirectories have become symbolic links to
licenses in our toplevel `licenses` directory. For any particular
subdirectory's license file in the diff, you can click `... -> View
file` and then click on the text that says "Symbolic Link" on that page.
This will take you to the license file that it links to.

I have also updated the `tools/upgrade-version` script to update the
change date in the new `licenses/BSL.txt` file.

# API and ABI breaking changes

None.

# Expected complexity level and risk

1

# Testing

None. Only changes to license files.

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-08-12 18:20:58 +00:00
Noa 742303ca49 Bump rust-toolchain to rust 1.88 (#2749)
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
2025-07-15 17:39:41 +00:00
Jeffrey Dallatezza 5770386264 Fix equality comparison between Row::Ptr and Row::Ref (#2914)
Co-authored-by: joshua-spacetime <josh@clockworklabs.io>
2025-07-07 16:09:11 +00:00
Mazdak Farrokhzad c3afc171e7 Remove unnecessary .clone() in pipelined.rs (#2897) 2025-06-25 14:20:44 +00:00
Mazdak Farrokhzad ad39b7b8a8 spacetimedb_execution: avoid get_row_ref (#2806) 2025-06-04 17:44:35 +00:00
joshua-spacetime 8a16a12304 Build indexes over TxData for subscription eval (#2768) 2025-05-28 20:53:14 +00:00
joshua-spacetime 59faab8a1f Remove redundant rows from subscription updates (#2654) 2025-04-24 00:54:07 +00:00
joshua-spacetime adf42551c8 Add rls to the sql api (#2526) 2025-04-02 17:36:20 +00:00
Mario Montoya 98395ca530 Print back the # of rows affected (ins, upd, del) with timings (#2462)
Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
2025-03-28 16:57:23 +00:00
Mario Montoya f9f38543c8 Add readmes to all implementation crates specifying that they do no offer stable interfaces (#2320) 2025-03-06 19:50:17 +00:00
joshua-spacetime aeaa7a423d Add support for COUNT (#2285) 2025-02-20 16:37:33 +00:00
joshua-spacetime 6abfe8ddba Add support for LIMIT (#2279) 2025-02-19 20:18:44 +00:00
Mazdak Farrokhzad b50b6841f1 Add direct indices to datastore (#2221) 2025-02-07 01:06:38 +00:00
joshua-spacetime 75ab91d36d Handle optimization and execution errors on initial subscription (#2213) 2025-02-06 19:14:44 +00:00
joshua-spacetime 6aa75bd0eb Track compute metrics for sql dml with new engine (#2190) 2025-01-31 17:59:33 +00:00
joshua-spacetime 4b4484a3aa Track query and datastore cpu usage metrics (#2140) 2025-01-29 21:30:41 +00:00
Noa 293aebaef9 Bump to Rust 1.84 (#2001) 2025-01-28 23:11:29 +00:00
joshua-spacetime 149ff9760c Query execution updates for cpu metrics (#2130) 2025-01-22 23:29:53 +00:00
Mazdak Farrokhzad 6f428f3afb Make the key of Table.indexes be IndexId (#2124) 2025-01-17 18:42:54 +00:00
joshua-spacetime 3798f468a6 query engine integration (#2074) 2025-01-11 00:01:24 +00:00
Mario Montoya 17423a4cf0 Add missing LICENSE (#1960) 2024-11-07 22:33:15 +00:00
joshua-spacetime f199ba5ca8 Cached query execution plan (#1923) 2024-11-01 16:22:47 +00:00
joshua-spacetime 839aa99027 feat: Add non-unique index join iterator (#1908) 2024-10-25 19:10:35 +00:00
joshua-spacetime c840eda037 Physical query plan + executors (#1881) 2024-10-24 17:30:59 +00:00