Commit Graph

161 Commits

Author SHA1 Message Date
Aaron Son a90a4bca07 go: sqle/statspro: prollyStats: FlushFromMem: Fix long-held lock when flushing stats to disk.
For sql-server instances with many databases, many branches or many tables
indexes, flushing stats could cause queries to block until stats were finished
flushing. StatsController attempted to rate limited how much I/O bandwidth
would be used to flush stats, but this is currently counter-productive because
all queries are blocked from analyzing successfully until stats are flushed.

This changes it back to flush stats to disk as quickly as possible when we need
to do it. Computing stats is already rate limited, so for large flushes this
should not happen to often.

We will continue to improve things here so that stats writes have less impact
on server resource utilization and do not block user-facing work as they
proceed.
2025-05-20 15:42:57 -07:00
Aaron Son 48f26f3562 go: sqle/dprocedures: fetch,pull,push: Rebase the remote database before we interact with it.
We need to rebase a remote in order to see its latest changes.

Fixes #9164.
2025-05-05 12:15:52 -07:00
Neil Macneale IV 3c026b869c go mod tidy 2025-04-18 14:55:08 -07:00
Neil Macneale IV dc16683143 A more non-deterministic test for --amend 2025-04-07 15:43:45 -07:00
Neil Macneale IV 297f42cdb5 Add basic interleaved test for --amend 2025-04-07 15:25:32 -07:00
Aaron Son ac439ac8f2 go/.../dprocedures,integration-tests/{bats,go-sql-server-driver}: Add simple smoke tests to assert that valctx is enabled for these test suites. 2025-03-30 11:48:14 -07:00
Aaron Son 5ebc57e0ab go,integration-tests/{bats,go-sql-server-driver}: Implement GC sesssion lifecycle validation at the storage layer. Enable checks for bats and go sql server integration tests.
This makes *NomsBlockStore check the incoming Context object to ensure that it
itself has been invovled in the appropriate GC lifecycle callbacks.

It fixes a problem with statspro.AnalyzeTable, where the GC lifecycle callbacks
happened more than once for a single session.

It fixes some callsites to appropriately make the GC lifecycle callbacks,
including LateBindingQueryist opening one session command for the whole
lifetime of the returned sql.Context.
2025-03-28 18:06:27 -07:00
Aaron Son 2d67459aee Update integration-tests/go-sql-server-driver/sql_server_max_conns_test.go
Co-authored-by: Neil Macneale IV <46170177+macneale4@users.noreply.github.com>
2025-03-27 14:28:03 -07:00
Aaron Son 9773be16d1 Merge remote-tracking branch 'origin/main' into aaron/max-connections-tests-go-sql-server-driver 2025-03-25 17:14:30 -07:00
Aaron Son bcfe25718a integration-tests/go-sql-server-driver: Run max conns tests in parallel. 2025-03-25 14:35:23 -07:00
Aaron Son 2ff00c2afc integration-tests/go-sql-server-driver: Implement max-connections testing to go-sql-server-driver. 2025-03-25 09:56:05 -07:00
Aaron Son 89b1513ec2 Merge pull request #8997 from dolthub/aaron/go-integration-tests-parallel
[no-release-notes] integration-tests/go-sql-server-driver: Add dynamic port allocation and run these tests in parallel.
2025-03-25 09:43:53 -07:00
Aaron Son fdb00a3853 integration-tests/go-sql-server-driver: PR feedback. 2025-03-24 17:52:53 -07:00
Aaron Son 7bde4e7198 integration-tests/go-sql-server-driver: Improve the robustness of TestConcurrentGC a bit. 2025-03-24 14:27:46 -07:00
Aaron Son da6ddc205f integration-tests/go-sql-server-driver: Give some replication tests a bit longer grace period to replicate synchronously. 2025-03-17 18:08:23 -07:00
Aaron Son 14f5157b03 [no-release-notes] integration-tests/go-sql-server-driver: Add dynamic port allocation and run these tests in parallel.
Takes local runtime from 500+s to ~100s.
2025-03-17 17:48:33 -07:00
Neil Macneale IV 3c6be04765 I got a fever, and I need more cowbell... or go mod tidy 2025-03-17 10:45:27 -07:00
Aaron Son 68175f00d3 go: sqle/dsess: session.go: Fix transaction savepoint creation when cluster replication is enabled.
Cluster replication creates a system database, `dolt_cluster`, which does not
support transactions. There are also UserSpaceDatabases which do not support
CreateTransaction. CreateTransaction has special code to avoid visiting them
when recording the start transaction state. CreateSavepoint needed to be
updated with that logic as well.
2025-03-12 10:54:33 -07:00
Aaron Son 03510f5510 go/Godeps,integration-tests/go-sql-server-driver: Hygiene for the Golang version bump. 2025-02-26 15:35:24 -08:00
Aaron Son 837ae43d35 integration-tests/go-sql-server-driver: auto_gc_test.go: Bring down amount of garbage produced by replication test to improve speed. 2025-02-22 06:34:22 -08:00
Aaron Son 4ce49e6a24 go: store/nbs: store.go: Fix GetManyCompressed to not redeliver chunks on waitForGC retry. 2025-02-21 17:14:53 -08:00
Aaron Son efb5edca30 go: sqle: auto_gc: Move to a background thread which periodically checks, plus gets triggered by a commit hook.
This helps handle the stanbdy replica case, where commits come in through
remotesrv directly into the ChunkStore, and not through the datas.Database.
2025-02-21 08:41:03 -08:00
Aaron Son 143893303b integration-tests: go-sql-server-driver: auto_gc_test: Add a skipped test for auto-gc occurring on a standby replica. 2025-02-20 16:15:21 -08:00
Aaron Son 7c9c808bf3 Merge remote-tracking branch 'origin/main' into aaron/autogc 2025-02-13 17:32:18 -08:00
Aaron Son ced4653888 go: store: nbs: Improve goroutine cleanup on gc_copier, some robustness improvements on KillConnection safepoint controller. 2025-02-13 16:36:43 -08:00
Aaron Son 62e50323df integration-tests/go-sql-server-driver: auto_gc_test.go: Tweak asserts to be more reliable. 2025-02-10 21:55:32 -08:00
Aaron Son dc4b94d68d sql-server: Add behavior: auto_gc_behavior: enable.
When Auto GC is enabled, the running sql-server will periodically
collect a Dolt database that is growing in size. This behavior
is currently experimental. Tuning the behavior around how often to collect is
ongoing work.
2025-02-10 19:54:44 -08:00
Aaron Son 7c1cff7f52 integration-tests/go-sql-server-driver: Fix bug in concurrent_gc_test. 2025-01-30 12:04:52 -08:00
Aaron Son 5826451024 Merge remote-tracking branch 'origin/main' into aaron/dsess-lifecycle 2025-01-30 11:58:56 -08:00
Aaron Son fc3217e92c go: sqle: dolt_gc: Add DOLT_GC_SAFEPOINT_CONTROLLER_CHOICE env variable to control dolt_gc safepoint behavior.
This is a short-term setting which will allow choosing the session-aware
gc safepoint behavior, instead of the legacy behavior which kills all
in-flight connections when performing a GC.
2025-01-28 15:46:46 -08:00
Aaron Son 1b594208aa go/store/nbs: generational_chunk_store.go: In GCMode_Full, also take dependencies on chunks read from OldGen. 2025-01-28 12:02:24 -08:00
James Cor 758627e735 implement implicit commits and fix import behavior (#8767) 2025-01-22 10:27:41 -08:00
Neil Macneale IV 6ce2a0324d More tidy 2025-01-02 13:24:22 -08:00
Zach Musgrave 59314e926c Merge pull request #8645 from dolthub/zachmu/load-vars
Removed persitence behavior from config
2024-12-06 15:37:09 -08:00
Zach Musgrave 324e4bb5ed Removed unused tests 2024-12-06 15:08:23 -08:00
coffeegoddd 00732cb5e0 /{.github,go,integration-tests}: bump go 2024-12-02 17:05:37 -08:00
Dustin Brown 5e44ddd7e1 [auto-bump] [no-release-notes] dependency by max-hoffman (#8573)
* [ga-bump-dep] Bump dependency in Dolt by max-hoffman

* fix build

* [no-release-notes] bump

* tidy

* fix license

* test driver mod

* try updating work sum

---------

Co-authored-by: max-hoffman <maximilian.wolfgang1@gmail.com>
2024-11-20 10:14:18 -08:00
coffeegoddd f81e847f74 /integration-tests/go-sql-server-driver: run go mod tidy in integration-tests/go-sql-server-driver 2024-09-16 10:42:54 -07:00
Brian Hendriks 6b3cd4b68d go tests for signing 2024-09-13 00:43:53 -07:00
Jason Fulghum 2112309acd go mod tidy for sql-server integ tests 2024-06-26 13:04:18 -07:00
jennifersp 4c704c3dae add SchemaName to DatabaseSchema interface (#8062) 2024-06-25 15:35:14 -07:00
Jason Fulghum 039a79d811 Updating tests for addition of performance_schema 2024-06-24 14:18:08 -07:00
Jason Fulghum 5ff76cd8ab Updating go version number in go.mod for go-sql-server-driver tests to match the go version number in Dolt's main go.mod 2024-05-17 14:56:17 -07:00
Jason Fulghum 8c315efb28 Removing second show warnings call in branch control block on write replication test 2024-05-13 16:10:34 -07:00
Jason Fulghum 535460aed9 bumping x/crypo|sys for sql-server integ tests 2024-05-09 19:41:22 -07:00
Maximilian Hoffman 5600e2689f Fix nil write session panic (#7792)
* Fix nil write session panic

* invert check

* zach comments

* [ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh

---------

Co-authored-by: max-hoffman <max-hoffman@users.noreply.github.com>
2024-04-29 17:23:54 -07:00
coffeegoddd 7c710dd211 /{.github,go,integration-tests}: bump go version 2024-03-27 14:02:28 -07:00
Aaron Son 10bfb3c31b integration-tests/go-sql-server-driver: go mod tidy. 2024-03-15 10:11:31 -07:00
Aaron Son 4e5febf8b1 Merge pull request #7482 from dolthub/aaron/cluster-standby-takes-epoch-from-primary
go: sqle/cluster: When in standby mode, take the epoch of the primary.
2024-02-14 12:15:27 -08:00
Aaron Son f77d4c494a go: sqle/cluster: When in standby mode, take the epoch of the primary. When in detected_broken_config, become standby if we see a higher numbered primary. 2024-02-09 14:32:06 -08:00