Commit Graph
45 Commits
Author SHA1 Message Date
Prathyush PVandGitHub ca6807860b Adding MessageCount to ListQueues response (#5130)
<!-- Describe what has changed in this PR -->
**What changed?**
Adding a new field MessageCount to ListQueues response.

<!-- Tell your future self why have you made these changes -->
**Why?**
This field will be useful for operators who wants to get details about
DLQs

<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**
Unit tests with 100% test coverage.

<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**


<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**
2023-11-20 15:10:30 -08:00
Prathyush PVandGitHub 65a44e18ba Adding ListQueues for Cassandra and SQL (#5098)
<!-- Describe what has changed in this PR -->
**What changed?**
Adding ListQueues API to QueueV2 and implementing it for Cassandra and
SQL

<!-- Tell your future self why have you made these changes -->
**Why?**
This API can be used by operators to list different types of queues
including DLQs.

<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**
Unit tests with 100% coverage.

<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**


<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**
2023-11-13 18:23:37 -08:00
Prathyush PVandGitHub d98eb745ad Adding FOR UPDATE for SelectFromQueueV2Metadata (#5075)
<!-- Describe what has changed in this PR -->
**What changed?**
Adding FOR UPDATE clause when fetching queueV2 metadata and removing
unused field version from queue metadata.

<!-- Tell your future self why have you made these changes -->
**Why?**
If a queueV2 metadata row is fetched in a transaction, we have to place
a lock on that row
to avoid another transaction reading from that line. This can happen
when two threads are trying to
delete messages from the queue. Two of them will update queue metadata
and write it back. This will lead
to a race condition. By adding 'FOR UPDATE' SQL clause, the first
transaction will get an exclusive lock
on the row. The second transaction will wait until the first transaction
is complete or rollback.

Also, removing the version field from QueueV2 metadata table. We will
not be using this field since we are using sql transactions.


<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**
Unit test. Executed through the debugger to make sure
SelectFromQueueV2MetadataForUpdate() is called instead of
SelectFromQueueV2Metadata() when executed inside a trancation.


<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**


<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**
2023-11-04 09:56:35 -07:00
dd6f2b313c Adding RangeDelete and CreateQueue methods for QueueV2 SQL Implementation (#4980)
<!-- Describe what has changed in this PR -->
**What changed?**
Adding RangeDeleteMessages() and CreateQueue() methods for SQL version
of persistence.QueueV2, which supersedes the persistence.Queue
interface.


<!-- Tell your future self why have you made these changes -->
**Why?**
We plan on using this for the upcoming history task DLQ project.


<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**
Unit tests. Code has 100% unit test coverage.


<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**


<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**

---------

Co-authored-by: Michael Snowden <[email protected]>
2023-10-20 13:20:38 -07:00
Prathyush PVandGitHub 720ebc5a14 EnqueueMessage and ReadMessage methods for QueueV2 SQL Implementation (#4937)
<!-- Describe what has changed in this PR -->
**What changed?**
Adding EnqueueMessage() and ReadMessage() methods for SQL version of
persistence.QueueV2, which supersedes the persistence.Queue interface.
The implementations for delete and merge are left out for now and will
be implemented later.


<!-- Tell your future self why have you made these changes -->
**Why?**
We plan on using this for the upcoming history task DLQ project.


<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**
Unit tests.

<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**


<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**
2023-10-10 09:57:37 -07:00
Rodrigo ZhouandGitHub f144062d7f Support count group by in visibility with SQL (#4666) 2023-07-27 16:03:09 -05:00
Roey BermanandGitHub a30e8a2e7d Implement build id scavenger (#4430) 2023-06-09 10:36:38 -07:00
Matt McShaneandGitHub 932003d936 Inline UpdateInfo Storage (#4420)
* Revert "Capture UpdateInfos in MutableState mutation (#4372)"

This reverts commit c78ee02eee.

* Revert "Adds update state indexing to MutableState (#4224)"

This reverts commit f8303d8e7e.

* Add UpdateInfo map to WorkflowExecutionInfo

This inlines the UpdateInfo index into the pre-existing execution blob
so that downstream persistence implementations won't see any change.
2023-05-31 13:46:55 -04:00
Roey BermanandDavid Reiss fea92f6358 Address comments from #4346 review (#4405)
Note: This commit came from a feature branch and is not expected to build.
2023-05-26 16:03:31 -04:00
Roey BermanandDavid Reiss d98b6668b0 Worker versioning leftovers (#4400)
Note: This commit came from a feature branch and is not expected to build.
2023-05-26 16:03:31 -04:00
Roey BermanandDavid Reiss cbfa37e0af Implement GetWorkerTaskReachability API (#4346)
Note: This commit came from a feature branch and is not expected to build.
2023-05-26 16:03:31 -04:00
Roey BermanandDavid Reiss 8a2a3e7a6a Implement task queue user data seed (forced replication) (#4259)
Note: This commit came from a feature branch and is not expected to build.
2023-05-26 16:03:31 -04:00
Roey BermanandDavid Reiss e3b52e558d Refactor to use new protos and persistence (#4194)
Note: This commit came from a feature branch and is not expected to build.
2023-05-26 16:03:31 -04:00
Yu XiaandGitHub 2218dea8fb Add replication dlq metrics (#3876) 2023-05-11 17:33:24 -07:00
Matt McShaneandGitHub f8303d8e7e Adds update state indexing to MutableState (#4224)
Add UpdateInfo records to MutableState

A mechanism for storing pointers into the workflow history representing
update accepted or completed events. Storage added for Cassandra,
PosgtreSQL, MySQL, and SQLite.
2023-05-03 12:24:32 -04:00
Yichao YangandGitHub 0befbfc700 Remove unused persistence GetHistoryTask API (#4003) 2023-03-06 14:32:18 -08:00
Rodrigo ZhouandGitHub b2a733823e Support CountWorkflowExecutions for SQL DB (#3955) 2023-02-14 16:59:12 -08:00
Rodrigo ZhouandGitHub 49ababab77 Advanced visibility for SQLite (#3895) 2023-02-03 00:46:58 -08:00
Rodrigo ZhouandGitHub 7e1ddb70dc Add GetIndexName method to visibility manager (#3820) 2023-01-27 00:44:39 -08:00
Rodrigo ZhouandGitHub 77f0af8625 Fix time fields of rows from GetClusterMembers (#3840) 2023-01-25 17:18:50 -08:00
Rodrigo ZhouandGitHub f5c2446dc3 Fix GetWorkflowExecution in PostgreSQL (#3816) 2023-01-24 12:20:45 -08:00
Yichao YangandGitHub b5ff033db0 Support arbitrary history task category in SQL persistence (#3489) 2022-10-19 16:08:01 -07:00
Rodrigo ZhouandGitHub 4213f95d0f Create visibility GetWorkflowExecution API (#3488) 2022-10-17 19:26:16 -07:00
Michael SnowdenandGitHub 73f94d9300 Implement GetAllHistoryTreeBranches for SQL persistence backends (#3438) 2022-09-29 17:00:06 -07:00
Alex ShtinandGitHub aca2c15276 Make staticcheck great again (#3103) 2022-07-15 10:01:11 -07:00
3f359ab721 add support for multiple pragma statements and driver syntax (#3031)
* add support for multiple pragma statements and driver syntax

* Update common/persistence/sql/sqlplugin/sqlite/driver.go

Co-authored-by: Alex Shtin <[email protected]>

* Update common/persistence/sql/sqlplugin/sqlite/plugin.go

Co-authored-by: Alex Shtin <[email protected]>

Co-authored-by: Alex Shtin <[email protected]>
2022-06-30 12:56:31 -07:00
Jeremy BreidingandGitHub efcfd1c538 Revert back to using file URI for sqlite dsn (#2731) 2022-04-19 19:47:35 -07:00
Jeremy BreidingandGitHub d3b480cab9 replace sqlite3 with modernc (#2704)
* replace sqlite3 with modernc

* file mode tests

* Expand tests to include file persistence for sqlite
2022-04-13 15:29:38 -07:00
Jeremy BreidingandGitHub 5d0296a421 Add sqlite persistence tests (#2681)
* Add sqlite persistence tests

* fix up a test

* Remove limit on prune operation for sql plugin
2022-03-30 13:05:33 -07:00
Yichao YangandGitHub ae23339fca Make matching persistence range queries [inclusive, exclusive) (#2599)
- Range for matching GetTasks is now [inclusive, exclusive), instead of (exclusive, inclusive]
- Range for matching CompleteTasksLessThan is now < max TaskID, instead of <=
- Range for admin ListTaskQueueTasks is now [inclusive, exclusive)
2022-03-15 10:42:12 -07:00
Yichao YangandGitHub be2e4a2d56 Support pagination for SQL GetTransfer/VisibilityTasks (#2564)
- support pagination for sql GetTransfer/VisibilityTasks
- improve pagination for sql GetTimer/ReplicationTasks
- new ExecutionMutableStateTaskSuite suite
2022-03-04 12:29:31 -08:00
Yichao YangandGitHub 3896610a3d Unify history task persistence range query behavior (#2547)
- Make range based on taskID and task fire time both [inclusive, exclusive)
2022-02-28 12:08:18 -08:00
Jeremy BreidingandGitHub a5ddc3ca73 Sql task queue visibility (#2537)
* Adding task_queue to read/write paths
for postgresql executions_visibility

* Adding task_queue for mysql and sqlite
2022-02-24 18:22:46 -08:00
Mikhail GryzykhinandGitHub ef2063c9e5 Add support for GetWorkflowHistory in reverse order (#2442)
Add API to fetch workflow history in reverse order
2022-02-14 12:49:02 -08:00
Yichao YangandGitHub 13b102065e Remove unused queue processor (#2473) 2022-02-08 10:39:11 -08:00
Anton TitovandGitHub 1eb5f58597 Single binary server (SQLite) and concurrency bugfixes for in memory storages (#2114) 2022-01-31 22:34:33 -08:00
Alex ShtinandGitHub 87c5e9873a Enable cgo by default and disable it explicitly for docker image build (#2396) 2022-01-20 17:06:23 -08:00
Yu XiaandGitHub c3a5c35916 Remove cluster metadata dual write (#2358)
* Remove cluster metadata dual write

* Update sample cluster config
2022-01-11 14:09:09 -08:00
wxing1292andGitHub 0aa486930d Remove unnecessary start version from current execution table (#2236) 2021-11-29 14:46:56 -08:00
dbbbb27dd6 Add List Cluster Metadata API (#2206)
* Add List Cluster Metdata API

Co-authored-by: yux0 <[email protected]>
2021-11-19 14:31:25 -08:00
VitalyandGitHub a12c16d612 Add tiered storage queue processor (#2189) 2021-11-18 21:34:13 -08:00
5abf350905 Make cluster metadata schema backward compatible (#2177)
* Make cluster metadata schema backward compatible

Co-authored-by: yux0 <[email protected]>
2021-11-15 13:48:07 -08:00
c38d135021 Migrate cluster metadata store to use cluster metadata info table (#2155)
* Migrate cluster metadata store to use cluster metadata info table

Co-authored-by: yux0 <[email protected]>
2021-11-11 15:51:43 -08:00
Yimin ChenandGitHub 1ddc3c397f Promote local namespace to global namespace (#2105) 2021-11-01 15:05:26 -07:00
Jacob LeGroneandGitHub c6eee98792 Add SQLite storage driver (#1968)
* Import SQLite driver from Temporalite: these files originated from https://github.com/DataDog/temporalite
* Add SQLite driver layer & UT
* Use mattn SQLite driver

NOTE: SQLite support is still in development stage
2021-09-29 14:20:40 -07:00