Commit Graph

44 Commits

Author SHA1 Message Date
Dmitry Shmulevich f819b290f7
redis state store: implement state query API (#1488)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2022-03-02 10:51:09 -08:00
Dmitry Shmulevich c7adb917f3
update license to Apache v2.0 (#1406) 2022-01-04 19:53:31 -08:00
Long Dai 988fed05ab
ci: standard linter config (#1102)
* ci: standard linter config

Signed-off-by: Long <long.dai@intel.com>

* Update utils.go

* fix pulsar issue

Signed-off-by: Long <long.dai@intel.com>

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-09-21 15:21:59 -07:00
Bernd Verst aa7d2ee1dd
Adds Default TTL Option for Redis State Store (#1059)
* Adds Default TTL Option for Redis State Store

* Add additional tests

* Parse correct property key

Co-authored-by: Bernd Verst <me@bernd.dev>
2021-08-09 18:06:59 -07:00
Long Dai 10a2e5ee85
state: correct FIRST_WRITE (#995)
* state: correct FIRST_WRITE

Signed-off-by: Long Dai <long0dai@foxmail.com>

* add a test case

Signed-off-by: Long <long0dai@foxmail.com>
2021-08-03 17:26:45 -07:00
Bernd Verst 7df53a1d76
Adds support for TTL in Redis State Store (#990)
* Adds support for TTL in Redis State Store

* return explicit errors

* Refactor Redis TTL

* reduce nestedness

* Changing if logic for ttl to fit lint

* Ignore lint for nestif

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-14 16:37:51 -07:00
Taction 464d53d94b
Move the common Redis code to internal (#859)
* Move pubsub redis client to internal

* Add failover for common redis. Refactor state redis.

* refactor binding redis

* fix lint

* Refactor to setting partten

* fix db and lint

* fix lint

* for backward compatibility

* Using a type alias to handle decoding duration values of -1 for Redis.

* Linter fixes

Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
2021-06-06 23:24:36 -07:00
문찬용 b387fcdff3
add Ping operation to`store` interface. (#757)
* add `Ping` operation.

* add `Ping` implementation of GA components

* add context to an argument for Ping

* add `Ping` implementation of blobstorage

* fix error string for passing lint

* Update blobstorage.go

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-05-25 23:48:46 -07:00
zhangchao 69b24d0394 fix lint 2021-04-23 22:32:26 +08:00
zhangchao b1c81523c2 fix add add a ctx context variable in the Redis struct. And implement `Close() error` function. 2021-04-23 22:15:33 +08:00
zhangchao 5190fe4e7d Merge branch 'master' into upgrade_redis_client_to_v8
resolve conflict

* master:
  Increasing overall test timeout to allow for conformance tests to run (#834)
  Improve SMTP binding performance (#782)
  add redis cluter mode for pubsub (#823)
  downgrade the verbosity of lock renewal errors from warn to debug. This error is expected when messages are processed before beingrenewed (#803)
  Improve pulsar publisher performance. (#827)
  optimze(state/redis): output detail redis error (#825)
  Consul nameresolution component (#750)
  Add DNS name resolver. Add unit tests. (#743)
  Azure Service Bus: Changed log level of error on close to info (#830)
  Removed dependency on dapr/dapr in favor of dapr/kit. Fixed go mod dependencies afterwards. Go 1.16 in go.mod. Removed accidental log dependency. (#807)
  Update state/blobstorage.go to add metadata. (#786)
  Azure Service Bus publishing retries when server is "too busy" (#821)

# Conflicts:
#	bindings/redis/redis.go
#	go.mod
#	go.sum
#	pubsub/redis/redis.go
2021-04-22 09:13:01 +08:00
yellow chicks 2320824409
optimze(state/redis): output detail redis error (#825)
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-04-21 10:43:05 -07:00
Phil Kedy 688df9bda4
Removed dependency on dapr/dapr in favor of dapr/kit. Fixed go mod dependencies afterwards. Go 1.16 in go.mod. Removed accidental log dependency. (#807) 2021-04-19 12:06:10 -07:00
Phil Kedy 814145dca3
Merge branch 'master' into upgrade_redis_client_to_v8 2021-04-12 19:52:16 -04:00
zhangchao 3ec4b336a9 upgrade go-redis/redis to v8, and use context in pubsub/redis to cancel redis request. 2021-04-10 23:41:58 +08:00
Syuparn 760a4caccc fix password config for redis sentinel state 2021-03-27 19:21:45 +09:00
yellow chicks c3b161ed83
fix(typo): state redis log (#761) 2021-03-17 23:14:56 -07:00
Artur Souza 931048aa60
Add Feature list for state store. (#744)
* Add Feature list for state store.

* List Transactional as a feature for state store.

* Fixing comments about etag.
2021-03-05 14:55:23 -08:00
Phil Kedy a15c616bb0
Make state.GetResponse ETag to a *string (#733)
* Make state.GetResponse ETag to a *string

* Small fixes post merge of #716

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-03-03 13:28:59 -08:00
Yaron Schneider 3ef025c604
change headers (#679) 2021-02-09 18:57:55 -08:00
Yaron Schneider 99256e6bec
Provide distinction between missing and empty etags (#600)
* provide distinction between missing and empty etags

* linter

* linter 2
2021-01-14 10:41:38 -08:00
Yaron Schneider 4d3e1be105
Treat etag errors across all state stores (#579)
* treat etag errors across all state stores

* linter

* linter
2021-01-08 18:59:42 -08:00
Sky/敖小剑 5dc3587f7d
Add bulk get in state store - Plan B (#532)
* add BulkGet method on state store

* add a bool value in bulk get method to tell dapr if this store supports bulk get or not

* add  BulkGetResponse for bulk get; rollback GetResponse to remove new added filed key

* update to use BulkGetResponse for bulk get

* fix lint issues

* fix lint issues

* fix lnit issues
2020-11-26 23:07:27 -08:00
halspang f647d9eedb
Upgrade golang lint to 1.31 (#490)
Upgrade golang lint to 1.31.0

https://github.com/dapr/components-contrib/issues/439
2020-10-12 12:54:15 -07:00
Artur Souza ab1ff1055a
Fixing bug where trx del in redis fails without etag. (#482) (#484) 2020-09-26 18:24:12 -07:00
Nghia Tran e51cff7fec
Use concurrency control in Multi() (#466)
Change Multi() to use same setQuery and delQuery mechanisms as Set() and Delete().
2020-09-22 15:13:39 -07:00
Mukundan Sundararajan d2ee3200cd
Properly handle serialization deserizliation for redis transaction api. (#460)
* Properly handle serialization deserizliation for redis, postgres transaction api.

* Convert marshaler to a utils function.

* Add license comment

* init error inline
2020-09-15 12:54:29 -07:00
AbserAri 2b1103ec9f
Redis failover feature (#459)
* update logger form nats-io's to dapr's

* run go mod tidy and go mod delete the nats-io gnatsd

* update rabbitmq prefetch feature because want to set each instance the number of messages could  hold in once until ack.

* update for parse int

* update parseMetadata of rabbitMQ to read prefetchCount by string.

* [update rabbitMQ binding parseMetadata] Make error clear

* update the redis failover metadata

* [in rabbitMQ metadata parse] fix the bug of golint

* [redis statestore failover feature] add new client logic.

* update redis metadata as advice.

maligned struct of size 80 bytes could be of size 72 bytes.

* update rabbitMQ with a new parseMetadata way.

* omit comparison to bool constant as golangci-lint.

* [typo] matser -> master

* Revert "Merge branch 'master' of https://github.com/dapr/components-contrib into dapr-master"

This reverts commit 9a91bccc4b, reversing
changes made to 7e0cb1fa2d.

* Revert "Revert "Merge branch 'master' of https://github.com/dapr/components-contrib into dapr-master""

This reverts commit 110ef82681.

* Revert "Merge branch 'master' of https://github.com/dapr/components-contrib into dapr-master"

This reverts commit 9a91bccc4b, reversing
changes made to 7e0cb1fa2d.

* solve the conflct

* merge from the master to accept the change

* remove the defaultFailover as the reviewed.

* move newclient to function

* Update state/redis/redis.go

Co-authored-by: Nghia Tran <tcnghia@gmail.com>

* update comment to /* #nosec  */

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Nghia Tran <tcnghia@gmail.com>
2020-09-14 17:14:52 -07:00
Young Bu Park c69d5ea2ca
Add metadata property to TransactionalRequest (#430)
* Add Metadata to transactional request

* Use new transactional request strcut
2020-08-12 09:30:37 -07:00
Shalabh Mohan Shrivastava 42668a8ae1
State Store Components changes to adhere runtime changes for removing retry options (#426)
* State Store Components changes to adhere runtime changes for removing state retry options

* resolving code review comments - common method to CheckRequestOptions
2020-08-11 10:50:31 -07:00
Mukundan Sundararajan 5c62707aba
Upgrade go version to 1.14.3 and linter version to 1.26.0 (#352)
* Upgrade to go 1.14.3 and linter version to 1.26.0
2020-05-29 15:26:33 -07:00
Young Bu Park 0489fb17f3
Fix linter errors (#293) 2020-04-01 17:22:15 -07:00
pruthvidhodda fe9b90075a
Change redis client library to go-redis for redis component (#283)
* Change redis client library to go-redis for redis component to support TLS
2020-03-30 19:50:48 -07:00
Young Bu Park ee97c3c56a
Use dapr logger (#238)
* Use dapr logger

* skip linter false alarm
2020-02-28 15:49:49 -08:00
Young Bu Park e48d4bca90
Merge branch 'master' into state-fix 2019-10-29 16:55:12 -07:00
Haishi Bai b278fb7da0 relax etag check during delete 2019-10-29 16:24:31 -07:00
sayboras 8adf323961 Add github action for CI (#59)
* Initial commit

* Fixed all linting error

* Used prepared query instead of string format

* Enabled linter for test
Enabled below linters
    - gochecknoglobals
    - gochecknoinits

* Enabled below linters
    - godox
    - interfacer
    - maligned

* Revert name change for StateStore in pkg state

* Incorporate review comments

* Cleanup the github ci

* Correct typo

* Add golangci-lint version in github ci step

* Update Readme.md
2019-10-28 15:39:48 -07:00
Yaron Schneider 887cd92b8d
vendor update (#34) 2019-10-14 23:49:50 -07:00
shalabhs 4a62360ad4 - adding more corrections 2019-10-10 18:16:08 -07:00
Aman Bhardwaj 04bef3ac3f Adding license header and updating to MIT license. (#26) 2019-10-09 10:58:08 -07:00
Yaron Schneider 70c06fadd8
redis: skip marshalling if []byte (#23) 2019-10-06 07:53:26 -07:00
Yaron Schneider 2b8dbd2b44
dapr name change (#21) 2019-10-02 13:21:22 -07:00
Yaron Schneider ec74d90bf4
More descriptive Redis errors (#19) 2019-09-30 13:02:30 -07:00
yaron2 22fea6f43d initial commit 2019-09-26 15:47:41 -07:00