Commit Graph
18 Commits
Author SHA1 Message Date
Alex ShtinandGitHub 8e8f1b0f7c Remove license header from every file (#7689)
## What changed?
<!-- Describe what has changed in this PR -->
Remove license header from every file. Because it is really hard to
follow in this PR here is the summary:
1. License header is removed from all `.go` and `.proto` files
:fireworks::fireworks:🎆.
2. `LICENSE` file in the root directory has only Temporal and Uber
copyrights.
3. 5 other `LICENSE` files added to the packages which have copyrights
different from Temporal and Uber: Datadog, Xargin, "Mat Ryer, Tyler
Bunnell and contributors".
4. `license_file` flag is removed from all code generation tools.
5. `copyright_file` flag is removed from `go:generate mockgen`
directive.
6. All copyright related targets are removed from `Makefile`.
7. Updated Temporal copyright year to 2025 everywhere.

## Why?
<!-- Tell your future self why have you made these changes -->
I double checked with legal department that it is not needed to have
license header in every file. One file per repo is enough. I put all
copyrights to the root `LICENSE` file and removed header from all other
files. Also updated tools and `Makefile`.
2025-05-01 18:50:21 -07:00
Tim Deeb-SwihartandGitHub be7b5514a5 Reconnect to SQL databases when connections fail (#5926)
## What changed?

Both our PostgreSQL and MySQL database backends will now automatically
reconnect to the database when certain errors occur: all errors chosen
have been experienced when testing this behavior through an AWS Aurora
RDS failover of either MySQL or PostgreSQL.

For both backends we will reconnect when we see:
- `ECONNRESET`
- `ECONNABORTED`
- `ECONNREFUSED`
- `io.EOF`
- `io.ErrUnexpectedEOF`
- `database/sql/driver.ErrBadConn`

for postgres we will also reconnect on the following SQLStates:
- `25006` read-only transaction
- `57P03` cannot connect now
- `0A000` feature not supported, but ONLY when the message is `cannot
set transaction read-write mode during recovery`

for mysql we will also reconnect when we see the following error codes:
- `1040` too many connections 
- `1792` read-only transaction (SQLstate `25006`)
- `1836` running in read-only mode

This logic is easily extensible should we discover more failure modes
over time

## Why?

We've had multiple community reports of Temporal problems during RDS
failover. One part of this is the fact that we wouldn't necessarily
reconnect; we were at the whims of our chosen SQL abstraction's
connection pooling logic.

## How did you test it?

I manually tested this functionality in the presence of repeated RDS
failovers: 

- [x] postgres12 plugin with pq driver
- [x] postgres12 plugin with pgx driver
- [x] mysql plugin

Automated testing will be added to our regular testing pipelines once
our infrastructure friends have added the support I need (it's in
progress)

## Potential risks

We're concerned there's a correctness issue in our PostgreSQL backend
that's related to our behavior during an RDS failover. If we merge this
before I figure out what's going on, we could hide the issue and make it
harder to reproduce.

## Documentation
N/A

## Is hotfix candidate?
Yes?
2024-05-17 16:59:15 -07:00
nagl-temporalandGitHub 99cbfe6380 Fix sporadic duplicate key errors in mysql queue implementation (#2802)
* More informative failures in queuePersistenceTest

* Fix sporadic duplicate key errors in mysql queue

* Fix lint
2022-05-09 09:24:07 -07:00
Yimin ChenandGitHub c0f5486fd6 Refactor Queue for namespace replication (#1625)
* Refactor Queue for namespace replication

* fix test
2021-06-15 14:00:44 -07:00
wxing1292andGitHub 24b80b2f91 Add context to all SQL interfaces (#980)
* Add context to all SQL interfaces
* Wire context with SQLx
* Set default execution DB timeout to 5s
* Set default visibility DB timeout to 10s
2020-11-11 16:30:36 -08:00
wxing1292andGitHub ef7860ce5d Add SQL specific tests for messages, part 2 (#914)
* Rewrite queue metadata APIs similar to transfer tasks, timer tasks
* Add queue metadata tests
* Add missing encoding type
2020-11-09 11:57:38 -08:00
wxing1292andGitHub a13e753cd7 Add SQL specific tests for messages, part 1 (#892)
* Rewrite APIs similar to transfer tasks, timer tasks
* Add queue message tests
2020-10-26 19:13:45 -07:00
Alex ShtinandGitHub 6a6909e92a Use vanity import package name go.temporal.io/server (#511) 2020-07-08 16:09:12 -07:00
Samar Abbas 888f52ebf3 Merges cadence commits to temporal 2020-04-20 11:27:56 -07:00
Alex ShtinandGitHub 4a25002ccc Update LICENSE file and all go files with new license header (#285) 2020-04-08 20:39:01 -07:00
Yu XiaandGitHub 52e63e6030 Change queue message id to big integer in Cas (#3149)
* Change queue message id to big integer
2020-03-30 23:18:26 -07:00
Samar Abbas 8e55282c63 merge from cadence 02-18-2020 2020-02-23 01:29:24 -08:00
Yichao YangandGitHub db38e74f13 Task Priority Assigner (#3023) 2020-02-13 12:58:23 -08:00
Yu XiaandGitHub cfd83e3ed3 Add DLQ Admin APIs and Integrate with CLI (#3010)
*Domain DLQ implementation
*Admin APIs
*CLI for DLQ operations
2020-02-10 13:39:55 -08:00
Alex Shtin 0e4ca57040 Merge from uber/cadence on 01-23-20. 2020-01-23 15:37:35 -08:00
Yu XiaandGitHub 23a5d6713d Add Domain Replication DLQ (#2964)
* Add Domain Replication DLQ

* Adding query range, limit and order on the DB dlq query
2020-01-13 20:52:04 -08:00
Samar Abbas 34bd0a03c2 resolve all merge conflicts and unit tests to work again 2019-12-10 12:20:56 -08:00
Quanzheng LongandGitHub fdee70fac9 Persistence refactoring to be pluggable for any database (#2836) 2019-12-05 15:59:09 -08:00