Commit Graph

196 Commits

Author SHA1 Message Date
Brian Hendriks
a8ea53509d repo formatting 2025-12-11 13:05:35 -08:00
Brian Hendriks
e44048ed20 add ability to skip metrics auth for the localhost 2025-12-11 11:50:11 -08:00
Brian Hendriks
6832617c61 jwt auth integration tests 2025-12-10 16:20:08 -08:00
coffeegoddd☕️✨
89ca6b26a1 /go.{mod,sum}: run go mod tidy 2025-11-10 16:20:53 -08:00
elianddb
b59aad1939 read_only always true on standby 2025-11-05 13:03:29 -08:00
Aaron Son
db127eb1b8 Apply suggestions from code review
Co-authored-by: Neil Macneale IV <46170177+macneale4@users.noreply.github.com>
2025-10-22 16:51:49 -07:00
Aaron Son
52e673e445 go/store/nbs: archive_writer.go: Fix problem with archive stream writer where we did not remove temptf files when we were pushing changes. 2025-10-22 16:23:08 -07:00
Neil Macneale IV
2263d186fd Keep cluster dolt_gc tests in place with auto_gc disabled. 2025-10-16 09:13:31 -07:00
Neil Macneale IV
3c1d4c772c Don't expect GC to fail in cluster tests. 2025-10-15 14:57:13 -07:00
Neil Macneale IV
f5a68f7d97 Account for nil AutoGCBehavior object to indicate default behavior 2025-10-15 11:55:24 -07:00
Aaron Son
06a1e9bb3a go/libraries/utils/earl: Add special handling for AWS URLs with non-compliant host components so that we can bump the Golang version. 2025-10-14 11:56:26 +02:00
Aaron Son
5e67de9f61 go-sql-server-driver: 1.25.1 here too. 2025-10-14 11:13:51 +02:00
coffeegoddd☕️✨
f375ab9267 /{go,integration-tests}: add patch version 2025-10-01 09:30:19 -07:00
James Cor
09f7c7043b [no-release-notes] bump golang version (#9859) 2025-09-18 13:39:41 -07:00
coffeegoddd☕️✨
500de379c0 /integration-tests/go-sql-server-driver/go.mod: run go mod tidy 2025-09-02 12:07:24 -07:00
coffeegoddd☕️✨
0ed843bb09 /{go,integration-tests}: bump go 2025-09-02 12:05:07 -07:00
coffeegoddd
700e985978 /{go,integration-tests}: rebase main 2025-08-27 12:55:58 -07:00
Neil Macneale IV
445973eaf8 PR Feedback 2025-08-26 14:14:43 -07:00
Neil Macneale IV
5d6fbf7e26 Update gc_oldgen_conjoin_test to be archive aware 2025-08-25 16:39:07 -07:00
Neil Macneale IV
57d43201fa BREAK ME UP 2025-08-25 16:33:04 -07:00
elianddb
e1a9cb3204 amend select query in repro 2025-08-25 21:21:43 +00:00
elianddb
f3c9b49630 Add repro for AUTO_INCREMENT not syncing on failover (cluster suite)
Integrates failing test into existing sql-server-cluster.yaml and removes standalone files. Implements fix: refresh AUTO_INCREMENT trackers on primary promotion to align with replicated data, preventing duplicate key errors post-failover. Adds debug logs (enable logrus debug to view). Prepares ground for resolving #9725.
2025-08-25 17:26:26 +00:00
Aaron Son
5aafc67c1c Small cleanup. 2025-07-15 16:59:51 -07:00
Aaron Son
39f4393553 Merge pull request #9464 from dolthub/aaron/sql-server-driver-test-timeout-investigation
[no-release-notes] integration-tests/go-sql-server-driver: Attempt to SIGQUIT a hung call dolt_gc in CI.
2025-07-08 16:48:36 -04:00
Aaron Son
22c07436ef integration-tests/go-sql-server-driver: Attempt to SIGQUIT a hung call dolt_gc in CI. 2025-07-08 11:02:42 -07:00
Aaron Son
1587640e03 Merge remote-tracking branch 'origin/main' into aaron/auto-gc-enabled-variable 2025-07-07 16:13:27 -07:00
Aaron Son
09e0ee22eb Add @GLOBAL.dolt_auto_gc_enabled system variable to inspect whether auto GC is enabled.
The system variable is read-only. The only way to enable Auto GC remains setting:

behavior:
  auto_gc_behavior:
    enable: true

in the config.yaml file which is given to `dolt sql-server` in its `--config` parameter.
2025-07-07 15:22:40 -07:00
Aaron Son
174b10e364 [no-release-notes] go: store/nbs: file_table_reader.go: Fix clone() so that it actually uses the reference count.
A bug in the usage of dynassert meant that clone() was always opening a new table file, instead of using the existing open file.

There were a few known consequences:

* the window of opportunity when unlocked reads could try to read a closed chunk source and receive an error was much larger than typical. As a result, auto_gc on a standby replica in a cluster was much more likely to fail spuriously.

* the number of file descriptors a running server would churn was higher than typical, and some operations were a bit slower / more prone to context switches than they needed to be.

This PR also updates some errors to be slightly more verbose about their origin.

This PR also updates TestAutoGC in go-sql-server-tests to run less iterations in CI and in -test.short mode. The iterations should be able to be lower since auto GC will fail less often now.
2025-07-07 14:34:35 -07:00
Aaron Son
8df274314b go: sqle/statspro: Rework the way stats manages its session in order to make it safe to continue collecting stats during a GC run.
Previously GC, even with the session-aware safepoint controller, such as is used with Auto GC, would cancel any ongoing stats work and would restart it at the end of the run. Because Auto GC can run quite frequently and because stats can take a while to run to completion, this meant that on some workloads stats would never successfully populate.

This PR changes stats so that it more correctly integrates with the session-safe GC safepoint controller. That allows GC to ensure that the stuff stats is currently working on gets carried over to the collected view of database, and stats itself has a chance to run to completion regardless of what GC work is going on.

This PR leaves the cancel-stats-on-collect behavior enabled for the kill-connections safepoint controller, where that behavior is still the correct one.
2025-06-27 14:29:53 -07:00
Aaron Son
e47e203d45 Merge remote-tracking branch 'origin/main' into aaron/statspro-faster-analyze-table 2025-06-12 14:48:51 -07:00
Aaron Son
2d00d71b96 integration-tests/go-sql-server-driver/auto_gc_test.go: Remove some flakey asserts for now. 2025-06-11 12:15:27 -07:00
Aaron Son
de9915b817 go/store/nbs: Move sanity checks panics from file_table_reader into dynamic enabled asserts. 2025-06-11 11:34:20 -07:00
Aaron Son
956f073dfd go: store/datas/database_common: store/nbs/store.go: Fix some issues when pushing to a dolt sql-server that is itself running GC.
A push to a remote works by uploading the missing content and then adding
references to it in the remote datastore. If the remote is running a GC during
the push, it is possible for the newly added data to be collected and no longer
be available when the references are added.

This should cause a transient failure which is safe is retry. There were a
couple bugs which could instead cause a panic. This makes some changes to
safeguard against those case.
2025-06-09 17:19:20 -07:00
Aaron Son
232e1aab6e go/store/nbs: archive_chunk_source.go: Make sure we skip getRecords marked found when fetching chunks.
This avoids delivering the chunk more than once, which parts of the application
layer are not expecting.
2025-06-05 17:05:23 -07:00
Aaron Son
c5d08aacd3 go: sqle/statspro: Make it so ANALYZE TABLE does not go through rate limiting on the SerialQueue.
This lets it run faster and at a speed independent of stats timer configuration.
2025-05-28 16:06:50 -07:00
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