* Hrana: don't close the stream at the end of prepared statement execution
* hrana stream and transaction: check for tokio runtime existence on drop
* standalone::execute_transaction test: raise simulation duration
* hrana: added comments to conditions for stream closing
* hrana: added comments to conditions for stream closing
- Added a test which performs data migration including
inserts, updates and deletes
- Added a test which shows that schema migration fails
if there is any conflicting data in the linked dbs
* Fork a new DB when creating from shared schema
* Use the correct db type to get the wal logger
* Add a test for a new db in shared schema
- When a new db is created with a shared schema, it should have
the same schema and the schema version
- When a new migration is done, the new db and all the existing
dbs should have the same schema and version
* Move schema db fork logic inside namespace mod
* clean up and remove unnecessary store call
Added a new method `store_and_maybe_flush` in MetaStore, which gives you an option to flush the config changes to disk.
The previous `store` method behaviour is not changed. It internally calls `store_and_maybe_flush` method, stores the config and flushes to disk.
This patch fixes a bug in fork. Earlier, we were flushing the target config before actually creating a fork. If the fork failed, MetaStore would have invalid data. Now, we store the config, without flush, create the fork. Iff successful, flush the target config to disk.
* adding backup sync await for schema migrations
* move backup_sync call after write_block was set
* perform backup in task
* save shared schema db backup once all databases confirm dry run
* added schema job backup sync
* adjusted tests
* ensure that there are no ongoing transactions before migrated db backup
* fixed flaky test
* tweaks
---------
Co-authored-by: ad hoc <postma.marin@protonmail.com>
* Add block_writes to Connection
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
* Add block_writes to PrimaryDatabase
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
* Use block_writes in Connection::run
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
* Unblock writes once migration is finished
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
* Block writes on startup if there are pending migration tasks
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
* Block writes when a migration task is enqueued
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
* twix
---------
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
Co-authored-by: ad hoc <postma.marin@protonmail.com>
* added an endpoint to ask for a general migration status
* return detailed information about individual migration job progress
* integrated migrations API in tests
* post-rebase
* adjusted code after rebase
There's no reason to have `is_autocommit()`, `changes()` or
`last_insert_row()` methods async because they're all fully local and
cannot block. Deasyncify them.
* bottomless: added ability to wait for uploaded frames without shutting down
* bottomless: savepoint tracker
* expose bottomless backup savepoint through PrimaryDatabase API
* tests for detached progression updates in bottomless progression tracker
* bottomless: reset savepoint tracker on new generation
* bottomless: expose savepoint tracker on PrimaryDatabase
* Aggregated stats for queries with most elapsed_time
* Add query percentile support to stats (#1112)
* Record query latency percentiles with hdrhistogram
* Expose queries percentiles through stats response
* Simplify QueriesStats transformation to QueriesStatsResponse
* Reset query stats at the beginning of every hour (#1118)
* Add expires_at to control when QueriesStats should be reset
* Add query count and elapsed sum to query stats response
Also group all latency aggregations together under the elapsed key
* Remove option sprawl on QueriesStats fields
By making the whole struct optional where it is used
* Add created_at to stats queries responde object
* Set queries stats to none when stats is created
This will make the API response the same when no queries
have been recorded on the queries stats struct. This can
happen right after:
- the stats struct initialization
- the stats queries object expiration
Example of stats API response when no queries have been
recorded:
{
...
"queries": null
}
* Use if else instead of early return from stats to response
* Add a regression test when UUIDs are used in attach
statements
Also, added a test to check if the UUID is wrapped
in quotes
* bugfix: trim namespace string if it is wrapped in quotes
the client might send namespace wrapped in quotes in case of uuids,
so we will just trim the string.