Commit Graph

3186 Commits

Author SHA1 Message Date
Kim Altintop 91594fed0e core: Refine replay test 2023-11-15 11:14:54 +01:00
Kim Altintop 99b65bc116 core: Refine message log errors 2023-11-15 11:14:54 +01:00
Kim Altintop 12d68da3ab core: Replay database prefix
If a commit cannot be decoded from the log, stop replaying and truncate
the log to the known-good prefix.
2023-11-15 11:14:54 +01:00
Mazdak Farrokhzad f017e33552 Nix impl TryFrom<&str> for IndexType (#559)
Signed-off-by: Mazdak Farrokhzad <twingoow@gmail.com>
2023-11-15 01:41:11 +01: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
Piotr Sarnacki dedd5a7991 Disable latest docker tag (#546) 2023-11-13 21:27:43 +01:00
Mazdak Farrokhzad 48e299c3f2 delete_by_col_eq: optimize with smallvec for 1 row case (#547) 2023-11-13 20:17:34 +00:00
John Detter 2ffea9b0ba Desparse Tar Files When Building (#544)
* Fix sparse tar issue

* Bump CI

* I think this is the right argument

* Use dd on mac because cp doesn't support the option we need

* Removed unused package

---------

Co-authored-by: John Detter <no-reply@boppygames.gg>
2023-11-13 13:55:01 -06:00
Mario Montoya 321da54db7 Add integration test for the query macro (#538) 2023-11-13 11:30:48 -08: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
John Detter 246799317f Small bug fix for drawing player mass 2023-11-10 12:08:52 -06:00
John Detter 70c64922fc Added arena controller, mass decay, players eating other players 2023-11-10 11:45:05 -06: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
Kim Altintop fa96dc2fa5 core: Add truncation to message log
Adds a method `reset_to(offset)` to `MessageLog`, which allows to
truncate the log to the given message offset.

Note that this currently requires to iterate over the last segment until
the message offset is found -- we may in the future maintain an offset
index (a la Kafka) to be able to seek closer to the desired message
offset.

`reset_to` subsumes the unused `reset_hard` method, and is itself not
yet used (this will be added in a later patch).
2023-11-09 10:05:33 +01:00
John Detter fc3aefabca Day 4 2023-11-09 01:24:07 -06:00
John Detter e7ce07b783 Builds CLIs on release/* branches (#545)
Co-authored-by: John Detter <no-reply@boppygames.gg>
2023-11-08 21:09:24 -06:00
John Detter 19be900b1d Downgrading some logs to trace instead of info (#542)
Co-authored-by: John Detter <no-reply@boppygames.gg>
2023-11-08 23:05:21 +00:00
Mazdak Farrokhzad 54e0f9212f InstanceEnv::delete_by_col_eq: return u32 instead of NonZeroU32 (#539) 2023-11-08 11:29:09 -08:00
George Kulakowski 4e052121be Update the pull request template (#541)
We've decided to move to a GitHub labelling system for tracking
breaking changes, so adjust the template accordingly.
2023-11-08 19:27:39 +00:00
George Kulakowski ec52acd6ae Downgrade a log line from info to debug (#540)
This log line is currently occuring too often. Later changes will
investigate the categorization of these "normal" errors, and more
holistically evaluate our log levels.
2023-11-08 19:11:01 +00:00
Ingvar Stepanyan 637bb39eb2 Capture logs in integration tests (#534)
Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io>
2023-11-08 17:07:55 +00:00
Nathaniel Richards 4cc6bb0f4b Created a route to check what emails are already connected to an identity (#477)
* Created a route to check what emails are already connected to an identity

* Delete .vscode/settings.json

Signed-off-by: Nathaniel Richards <46858886+NateTheDev1@users.noreply.github.com>

* Fixing errors

* Fixed trivial errors

---------

Signed-off-by: Nathaniel Richards <46858886+NateTheDev1@users.noreply.github.com>
2023-11-08 17:58:36 +01:00
John Detter 05401eb13d Initial commit 2023-11-08 10:17:43 -06:00
John Detter 192d857e57 Initial commit 2023-11-08 09:42:27 -06:00
Kim Altintop 5998a69089 core: Track the number of bytes read when iterating over the WAL
Mainly for providing additional error context when commit decoding fails.
2023-11-08 08:47:06 +01: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
Piotr Sarnacki d63621db02 Bump to 0.7.2 2023-11-07 21:23:49 +01:00
joshua-spacetime 9062843ab4 Track instance_queue_length by reducer (#530)
Co-authored-by: Noa <coolreader18@gmail.com>
2023-11-07 18:30:33 +00:00
John Detter 66ecc4d7d8 Cherry Pick for Publish Primitives Fixes (#514)
* Added license files for the primitives crate

* Fixed version number dependency thing

---------

Co-authored-by: Tyler Cloutier <cloutiertyler@aol.com>
2023-11-07 09:09:29 -08:00
Tyler Cloutier 8ba8dba598 Added multi column index usage to the rust-wasm-test module (#500)
Added multi column index usage to the rust-wasm-test module

This also updates integration test.

The number of lines in the output changes as there is 1 additional
line corresponding to the new table.
2023-11-07 16:59:17 +00:00
joshua-spacetime 4bc456d862 perf(507): Add disk and memory usage metrics (#529)
Closes #507.
2023-11-07 08:56:14 -08:00
joshua-spacetime ecebf3dcf7 refactor(531): Label transaction count metric with boolean flag (#532)
Fixes #531.

Instead of having two distinct metrics for commits and rollbacks,
this patch replaces them with a single metric plus a boolean label
representing whether the transaction was committed or rolled back.
2023-11-07 08:54:56 -08:00
Piotr Sarnacki ff988ac2e5 Bump version to 0.7.1 2023-11-07 14:55:49 +01:00
Piotr Sarnacki 7514724ff2 Fix identity constructor (#28)
At some point identities were returned in a form of { __identity_bytes:
string } object. This commit changes the implementation to accept
regular strings as an argument because that's how we get all of the
identities now.
2023-11-07 14:54:43 +01:00
Piotr Sarnacki a7a4db3875 Bump version to 0.7.0 2023-11-07 13:09:17 +01:00
joshua-spacetime 250115b5cc perf(505): Track the number of rows in each table (#525)
Closes #505.
2023-11-06 12:07:23 -08: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
Kim Altintop 9a263b039a Refactor commit encoding / decoding (#495)
* core: Refactor commit encoding / decoding

Use `sats::{BufReader, BufWriter}` for decoding / encoding of `Commit`
and associated types. This makes `decode` fallible (which is quite
desirable, instead of panicking).

As the `DecodeError` from sats is fairly sparse, also add some context
about where exactly decoding failed.

Lastly, add some documentation and (property) tests.
2023-11-06 10:23:06 +01:00
joshua-spacetime 82fe0f704a refactor(520): Change histogram units from nanos to fractional secs (#522)
Fixes #520.

The default prometheus histogram buckets are meant to be interpreted as f64 seconds.
Because previously we were using nanosecond units,
all observations were being placed in the last (+inf) bucket.
This change was made to avoid modifying the default bucket specification.
2023-11-03 18:19:04 -07:00
joshua-spacetime 4b3be1f9c8 fix(518): Label connected clients metric by database (#523)
Fixes #518.
2023-11-03 14:02:53 -07:00
Noa 593702c88d fix benchmarks run on master (#487) 2023-11-01 16:21:49 -05:00
Alessandro Asoni cdda98baa4 Add OptIn serialization attribute for C# generated types (#516)
* Add OptIn serialization attribute

* Run rust fmt
2023-11-01 12:32:29 -05:00
Mazdak Farrokhzad 141a725b96 Expose delete_by_rel (#515)
* expose delete_by_rel

* delete_by_rel: address pheobe's smallvec comment request
2023-11-01 16:53:41 +00:00
John Detter 331b1d8943 Spacetime Upgrade (#339)
* Upgrade command

* Lints

* Working on upgrade command

* More improvements - testing now

* Rebasing on master

* Download spinner is working properly

* More UX improvements

* Small fix

* Small fix for Linux

* Small change to upgrade, much cleaner now

* Fixes for windows

---------

Co-authored-by: Boppy <no-reply@boppygames.gg>
2023-10-30 23:22:22 -07:00
joshua-spacetime 76234048b9 perf(472): Add metric for index seeks and keys scanned (#501)
Closes #472.
2023-10-30 23:38:58 +00:00
joshua-spacetime d1cbef2558 perf(471): Add duration metrics for wasm abi calls (#499) 2023-10-30 14:55:46 -07:00
Kim Altintop 983b594fb9 Create multi-column indexes defined in modules (#494)
* Create multi-column indexes defined in modules

* Refactor schema diff result and add tests
2023-10-30 16:53:29 -05: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
joshua-spacetime b118b59c2f perf(469): Add metric for delayed transaction execution (#488)
Closes #469.

This metric tracks the amount of time a reducer spends in the wait queue,
past its scheduled execution time.
2023-10-30 13:18:38 -07:00
Mazdak Farrokhzad c566dbae3d spacetimedb-data-structures: new crate + nstr! (#491)
* spacetimedb-data-structures: new crate + nstr!

* nstr: address review comments
2023-10-30 18:00:54 +00:00