mongolly 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mongolly/extensions/mongo/mongo_client.rb +5 -7
- data/lib/mongolly/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 50c21716a1f00e3a327920da6efd15339c2bd90de8fd77e1a1fb1dc58b2a48bd
|
|
4
|
+
data.tar.gz: a8d44b7a0cae0ae463d5433ceb9ccac6c9508b6af659fe8eca85b2bfea114610
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 58bdb26a690ca200565950ee8d294cd527f7e23999bf121b660a8bb73aa6cbf316a553eac525fcc0fc63242281a51cb6d7dc6717f79a94a4a68144023a2391c1
|
|
7
|
+
data.tar.gz: f9a841961bafee07b4b668273fc2193a79cae08c87a8f55f0675a669badc9c8bba2c57bded0d777206986db237e1a651b068f0b58b281b2bf7c1692007f2dbb8
|
|
@@ -82,8 +82,6 @@ class Mongo::MongoClient
|
|
|
82
82
|
# Stop Config Server
|
|
83
83
|
ssh_command(options[:config_server_ssh_user], config_server, options[:mongo_stop_command], options[:config_server_ssh_keypath])
|
|
84
84
|
yield
|
|
85
|
-
rescue => ex
|
|
86
|
-
@mongolly_logger.error "Error with config server stopped: #{ex}"
|
|
87
85
|
ensure
|
|
88
86
|
# Start Config Server
|
|
89
87
|
ssh_command(options[:config_server_ssh_user], config_server, options[:mongo_start_command], options[:config_server_ssh_keypath])
|
|
@@ -101,8 +99,6 @@ class Mongo::MongoClient
|
|
|
101
99
|
end
|
|
102
100
|
@mongolly_logger.debug "With shard balancing disabled..."
|
|
103
101
|
yield
|
|
104
|
-
rescue => ex
|
|
105
|
-
@mongolly_logger.error "Error with disabled balancer: #{ex}"
|
|
106
102
|
ensure
|
|
107
103
|
enable_balancing
|
|
108
104
|
end
|
|
@@ -118,8 +114,6 @@ class Mongo::MongoClient
|
|
|
118
114
|
end
|
|
119
115
|
@mongolly_logger.debug "With database locked..."
|
|
120
116
|
yield
|
|
121
|
-
rescue => ex
|
|
122
|
-
@mongolly_logger.error "Error with database locked: #{ex}"
|
|
123
117
|
ensure
|
|
124
118
|
strong_unlock!
|
|
125
119
|
enable_profiling
|
|
@@ -220,7 +214,11 @@ class Mongo::MongoClient
|
|
|
220
214
|
rescue UnlockFailException => ex
|
|
221
215
|
@mongolly_logger.warn "Failed to unlock, #{ex}, sleeping #{UNLOCK_SLEEP} on attempt #{retries} of #{MAX_UNLOCK_RETRIES}"
|
|
222
216
|
sleep UNLOCK_SLEEP
|
|
223
|
-
|
|
217
|
+
if (retries += 1) <= MAX_UNLOCK_RETRIES
|
|
218
|
+
retry
|
|
219
|
+
else
|
|
220
|
+
raise ex
|
|
221
|
+
end
|
|
224
222
|
end
|
|
225
223
|
|
|
226
224
|
def backup_instance(address, options)
|
data/lib/mongolly/version.rb
CHANGED