Commit Graph

85 Commits

Author SHA1 Message Date
Mario Montoya 114aa994bf Fix output of binary, Identity, Address for SQL output and the 'Display' of them to show a full hex value (#1087) 2024-06-10 16:49:46 +00:00
Noa a54399495d Prune bindings deps (#1290) 2024-06-07 20:36:33 +00:00
Mazdak Farrokhzad c8225db8f5 1. Reduce visibilities, preparing to extract datastore crate (#1306)
2. More direct imports, preparing to extract datastore crate
3. Remove some dead code
2024-05-28 17:46:07 +00:00
Noa 471f4ff2ca recv-style abi (#1002)
* Bump module abi version

* recv abi module side

* recv abi host side

* Update csharp module sdk

* Fix name

* Address comments
2024-05-22 23:01:44 +00:00
Noa 0c7530ffc6 Disallow calling random lifecycle reducers (#1114)
* Disallow calling random lifecycle reducers

* Add lifecycle reducer smoketest
2024-04-29 19:11:05 +00:00
Mazdak Farrokhzad 5e78223ae7 nuke DataKey (#1093) 2024-04-16 06:49:14 +00:00
Mazdak Farrokhzad d6815ebf9c Shrink AV and AT to 24 & 16 bytes respectively, and also friends. (#1047) 2024-04-13 16:51:18 +00:00
Mario Montoya 29970d219a Implement 'sql' parsing for 'Identity, Address' in hex format (#786) 2024-04-11 17:31:08 +00:00
Noa abdaf88563 Move lib::{name,recovery} to client-api-messages (#570) 2024-04-10 20:24:05 +00:00
joshua-spacetime 5203b01fa6 refactor(1058): Remove feature flag for disabling metrics (#1059)
Closes #1058.
2024-04-09 20:25:32 +00:00
Noa 7d3bdc308b Prune deps from bindings dependency tree (#1014) 2024-04-03 01:54:36 +00:00
Mazdak Farrokhzad 9141a42622 Bump Rust to 1.77 + fix warnings + use Bound::map (#1020)
* bump Rust to 1.77 + fix warnings + use Bound::map

* use .truncate(true) for OpenOptions
2024-03-25 20:27:08 +00:00
Shubham Mishra 71d435d096 proto changes (#924)
* proto changes

* messageId -> requestId

* fix oneoffquery

* add metrics for subscription

* requestId for reducer

* timer for reducer

* revert oneOffQeury related changes

* request_id u32 -> bytes

* use default RequestId for rust sdk

* added json changes

* added test

* clippy
2024-03-06 16:13:52 +00:00
joshua-spacetime 313f592db9 perf(747): Single query execution for multiple subscriptions (#917)
Closes #747.

Before this change,
we would evaluate each and every query,
for each and every subscription,
on each and every row update.

If N subscriptions had a query Q in common,
it would be evaluated N different times.

With this change,
distinct queries are evaluated once,
and the results copied for each client.

So in the example above, Q would be evaluated once,
with the results transmitted to N different clients.
2024-03-05 16:52:24 +00:00
joshua-spacetime b19de57522 perf(831): Remove row_pk computation from query (#908)
* perf(831): Remove row_pk computation from query

Closes #831.

* perf(831): remove Op, use identical TableOp.

perf(831): remove unnecesary .into_iter().map_into().collect()

perf(831): cleanup evaluators and make them lazier

* nix PrimaryKey & UniqueValue

* add TableOp::{insert, delete}

---------

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
2024-02-29 17:04:04 +00:00
John Detter 79fd5ad75e Fix publish issues 0.8.2 (#853)
* Fix some issues related to publishing 0.8.2

* Added phoebe's fix

* Reverting file

---------

Co-authored-by: John Detter <no-reply@boppygames.gg>
2024-02-15 23:29:37 +00:00
Noa 92e5a62ae1 Reduce allocations for prometheus with_label_values (#810) 2024-02-14 20:17:05 +00:00
Noa 37658aae7e Add rust-version to Cargo.toml (#802)
* Add rust-version to Cargo.toml

* Use workspace inheritance to make bumping the spacetime version easier
2024-02-07 20:02:05 +00:00
Mazdak Farrokhzad 80d9372b48 SATS: add support needed for BFLATN => BSATN directly (#750)
* sats: add support needed for bflatn -> bsatn directly

Also some associated refactoring

* integrate phoebe's suggestions

Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io>
Signed-off-by: Mazdak Farrokhzad <twingoow@gmail.com>

* bflatn -> bsatn: add 'debug_assert's

---------

Signed-off-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io>
2024-01-24 16:53:47 +00:00
John Detter 8524d244f3 Version upgrade to 0.8.1 (#729)
Co-authored-by: John Detter <no-reply@boppygames.gg>
2024-01-18 18:16:58 +00:00
joshua-spacetime b0e80c6697 chore: Move table size metrics back into core (#719)
* chore: Remove unused metrics

* chore: Move table size metrics back into core

Table size metrics were previously moved out of core.
This was due to the query planner needing access to them.
However that dependency was ultimately managed differently via #677.
2024-01-12 22:07:00 +00:00
joshua-spacetime eed3be2ad2 fix(683): Label table metrics with table name (#712)
Fixes #683.

Previously we were labeling metrics with the table id only.
However the table name is almost always desired for diagnostics.
2024-01-11 01:21:49 +00:00
joshua-spacetime 09b2d0f033 refactor(metrics): Move table size metric into lib (#636)
Query optimization will soon need this metric.
Therefore it must be moved out of core and into lib.
Eventually we might want to move all metrics into lib.
2023-12-08 14:20:56 -08:00
joshua-spacetime c265ed195f refactor(metrics): Move metric builder macros into their own crate 2023-12-05 10:26:41 -08:00
John Detter 79ff6dffc6 Version upgrade to 0.8.0 (#622)
Co-authored-by: John Detter <no-reply@boppygames.gg>
2023-12-04 13:19:25 -06:00
Mario Montoya 4ef1bd5296 Refactoring bootstrapping and adding full support for constraints & multi-column indexes (#596)
* Refactoring bootstrapping and adding full support for constraints & multi-column indexes

* Removed deleted code and add some comments

* Add comment for Constraints

* Update crates/core/src/db/datastore/locking_tx_datastore/mod.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>

* Update crates/core/src/db/datastore/locking_tx_datastore/mod.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>

* Addressing some PR comments & remove cloning

* Adding details for when fail to decode rows in replay

* Apply Kim's fix for replay bug

* Addressing some PR comments

* Merge

* Fix conflicts

* Fix conflicts

* Fix test

* Fix generation of code for csharp & typescript, now it generate FilterBy for all columns

* Fix for index generation

* Fixing C# index generation

* Merge

* Fix compilation on csharp bindings

---------

Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: John Detter <no-reply@boppygames.gg>
2023-12-04 12:04:38 -05:00
Mario Montoya 4d49b14ee6 Format binary data as hex in sql/satn (#521)
* Format binary data as hex in sql/satn

* Add json test for identity

* Addressing some PR comments

* Fix test

---------

Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>
2023-11-29 13:01:55 -05:00
Noa 5a2b37b401 Update to rust 1.74 (#589)
* Update to rust 1.74

* Fix 1.74 clippy lints
2023-11-21 21:04:31 +00:00
Mario Montoya b3ccc13dab Refactoring IDs for system objects (#439)
* Refactoring IDs for system objects

* fixup

* Fix stray constraints text on refactor

* Fix conflict

* Merge

---------

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
2023-11-15 10:21:20 -05:00
Tyler Cloutier e5d3f422cf Fixes client API breaks introduced by #460 (#558)
* Fixes client API breaks introduced by #460

* lints
2023-11-14 11:06:45 +01:00
Mario Montoya f12a238237 Moving object defs to SATS (#460)
* Moving object defs to SATS

* move ColumnIndexAttribute to primitives, nix path attr

* revert unnecessary reformating

* ProductValue: don't take ColId
ProductValues can be more than rows and can be nested

* simplify sats::db::def wrt. Constraints + impl ser/de

* cargo fmt

---------

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
2023-11-13 12:21:56 +00:00
Mazdak Farrokhzad 07a362219c Misc refactoring preparing for multi col indices (#497)
* misc refactoring

* move SystemTableQuery to test code

* store IndexType as u8 instead of string
2023-11-09 16:14:06 +00:00
John Detter dff23de939 Version upgrade to v0.7.3 (#536)
Co-authored-by: John Detter <no-reply@boppygames.gg>
2023-11-07 21:55:14 -06:00
Kim Altintop 0a4c2f16b0 lib: Provide Arbitrary impls for Hash and DataKey
Allows to remove custom strategies for the commit log types (in core),
and may become useful for future property testing efforts.
2023-11-06 10:50:05 +01:00
John Detter b35e184051 Version Upgrade to v0.7.2-beta (#498)
Co-authored-by: John Detter <no-reply@boppygames.gg>
2023-10-30 16:53:06 -05:00
Mario Montoya f15a3be4ab Move optimizations from sql to vm (#484)
* Move optimizations from sql to vm

* Remove unused method
2023-10-30 11:46:02 -05:00
joshua-spacetime feaba247d8 refactor(485): Label metrics with database address and reducer name (#486)
Fixes #485.

Previously we were labeling metrics with internal database and reducer IDs.
2023-10-27 17:42:47 -07:00
Noa 628dac120e Simplify/deabstract module_host_actor and wasmer_module (#417)
* Simplify/deabstract module_host_actor and wasmer_module

* DatabaseLogger doesn't need an external mutex
2023-10-27 15:53:55 -05:00
Noa b78ae84f30 Replace hex Strings with Identity/Address where applicable (#300) 2023-10-20 17:51:50 +00:00
Mazdak Farrokhzad cba518d90e Use newtypes ColId, TableId, IndexId, SequenceId everywhere (*) (#408)
* Use newtypes ColId, TableId, IndexId, SequenceId everywhere (*)

* Addressing some PR comments

---------

Co-authored-by: Mario Alejandro Montoya Cortés <mamcx@elmalabarista.com>
2023-10-19 11:18:50 -05:00
Kim Altintop fca6cf3cb6 lib: Don't panic in RelValueRef::get (#450)
There is no guarantee that a named field is in the supplied table
header, nor that it is in the row. Panicking at this location can be
disastrous, while all call sites are inside Result already. So, return
Result.
2023-10-19 10:42:30 -05:00
John Detter 5864bfa8d7 Version upgrade: v0.7.1-beta (#441)
Co-authored-by: John Detter <no-reply@boppygames.gg>
2023-10-17 16:57:36 -07:00
Ingvar Stepanyan 469dff6e68 [ABI] Remove the special first element of iterator (#420) 2023-10-16 22:45:32 +01:00
Kim Altintop 41f9fac19e Fix authorization check for CrudCode (#431)
* Fix authorization check for CrudCode

Make all mutating SQL operations require the caller to be the database
owner.

* Add auth check tests + ensure all tables in a join are considered
2023-10-16 12:35:11 -07:00
Noa 4c6c9476d7 Switch to using imported module idents for marking version requirements (#335) 2023-10-11 14:14:36 -05:00
Mazdak Farrokhzad b494bf4a3c more AlgebraicType conversions + use derive_more::From more (#395) 2023-10-10 13:31:04 +00:00
Mazdak Farrokhzad 148ea2e48d reduce cloning of Header & co (#384) 2023-10-09 09:44:24 +02:00
Mazdak Farrokhzad a45c30c3d9 sats: misc refactoring (#382)
- more conversions
- prepare for getting rid of BuiltinValue & BuiltinType
- prepare for slim slices
2023-10-08 02:05:25 +02:00
Ingvar Stepanyan ba535f24d1 Move connection events to reducers (#309)
* Move connection events to reducers

* More rebase fixups

* Avoid double-reference

* Filter out special reducers in generate cli

This updates filtering of `__init__` to exclude all special reducers, as well as moves the filtering to centralised place before calling language-specific generate command.

* Incrememted ABI version number

---------

Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
2023-10-03 23:19:49 +00:00
John Detter de43e96b11 Version Upgrade to 0.7.0 (#355)
* Saving because I'm testing writing files

* New upgrade program working quite well

* Update license file as well

* Tool seems good to go

* Cargo check is passing, new upgrade-version is ready, old version
removed

* Updating lock file is required for CI to pass

* main.rs clippy lints

* More sensible default

* Version upgrade to 0.7.0 via new version-upgrade util

---------

Co-authored-by: Boppy <no-reply@boppygames.gg>
2023-10-03 22:27:11 +00:00