google-cloud-firestore 2.6.2 → 2.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/google/cloud/firestore/client.rb +18 -7
- data/lib/google/cloud/firestore/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43a875c5288189790070d70828e54d6a4d094979c0f2443c557a6e4fd3de1915
|
4
|
+
data.tar.gz: 982a614359a38a6227d8498a5d36f8fe49f2a198c7c9b3561b8e2d24bec07476
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb4b447824f289da585555d5210a4672872b7b8e99ca5c5c4a02577637b7d74565da923adb1ae2776d888645c2836e785a70f6080acdc0541c35482fd1dfbd08
|
7
|
+
data.tar.gz: 4a0641708dee2f1b923aeb3bf2aeca4b7517bd45fca9762376c2b1b16bf3cb1c8cd7b96956498c9031ec52c15662d1b9ea88e4f828cbb5f907a17ad7d54be41e
|
data/CHANGELOG.md
CHANGED
@@ -628,7 +628,24 @@ module Google
|
|
628
628
|
commit_return = transaction.commit
|
629
629
|
# Conditional return value, depending on truthy commit_response
|
630
630
|
commit_response ? commit_return : transaction_return
|
631
|
-
rescue Google::Cloud::
|
631
|
+
rescue Google::Cloud::AbortedError,
|
632
|
+
Google::Cloud::CanceledError,
|
633
|
+
Google::Cloud::UnknownError,
|
634
|
+
Google::Cloud::DeadlineExceededError,
|
635
|
+
Google::Cloud::InternalError,
|
636
|
+
Google::Cloud::UnauthenticatedError,
|
637
|
+
Google::Cloud::ResourceExhaustedError,
|
638
|
+
Google::Cloud::UnavailableError,
|
639
|
+
Google::Cloud::InvalidArgumentError => e
|
640
|
+
|
641
|
+
if e.instance_of? Google::Cloud::InvalidArgumentError
|
642
|
+
# Return if a previous call was retried but ultimately succeeded
|
643
|
+
return nil if backoff[:current].positive?
|
644
|
+
# The Firestore backend uses "INVALID_ARGUMENT" for transaction IDs that have expired.
|
645
|
+
# While INVALID_ARGUMENT is generally not retryable, we retry this specific case.
|
646
|
+
raise e unless e.message =~ /transaction has expired/
|
647
|
+
end
|
648
|
+
|
632
649
|
# Re-raise if retried more than the max
|
633
650
|
raise e if backoff[:current] > backoff[:max]
|
634
651
|
|
@@ -643,12 +660,6 @@ module Google
|
|
643
660
|
transaction = Transaction.from_client \
|
644
661
|
self, previous_transaction: transaction.transaction_id
|
645
662
|
retry
|
646
|
-
rescue Google::Cloud::InvalidArgumentError => e
|
647
|
-
# Return if a previous call was retried but ultimately succeeded
|
648
|
-
return nil if backoff[:current].positive?
|
649
|
-
|
650
|
-
# Re-raise error.
|
651
|
-
raise e
|
652
663
|
rescue StandardError => e
|
653
664
|
# Rollback transaction when handling unexpected error
|
654
665
|
transaction.rollback rescue nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-firestore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-core
|