mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
A few things were going wrong here. First, we take a "RetryPeriod" option on backup and restore which is meant to be roughly the total amount of time we spend retrying any given request before failing. However we were incorrectly passing that as the RetryMaxWait which is the maximum amount of time to sleep between any two attempts. We now do some fuzzy math to figure out approximately how many attempts we should make given a minimum sleep of 100ms and the fact that we double the sleep time every attempt. Second, during the backup test, if a host was totally stopped when we started the request, it would fail immediately and then retry, but if the host was stopped during the request (after DNS had resolved), then the request would wait for the DialTimeout which we default to 30s, so turning off the cluster for 5 seconds and turning it back on resulted in the backup completing rather than failing. Because of this, we change the commandClient to have a default dial timeout of 1 second. I was tempted to change the global default to 1s which I think would be fine, but didn't want to break anything too badly. |
||
|---|---|---|
| .. | ||
| backup.go | ||
| check.go | ||
| check_test.go | ||
| chksum.go | ||
| common.go | ||
| config.go | ||
| config_test.go | ||
| doc.go | ||
| export.go | ||
| export_test.go | ||
| generate_config.go | ||
| generate_config_test.go | ||
| import.go | ||
| import_test.go | ||
| inspect.go | ||
| inspect_test.go | ||
| main_test.go | ||
| rbf_check.go | ||
| rbf_dump.go | ||
| rbf_page.go | ||
| rbf_pages.go | ||
| restore.go | ||
| server.go | ||
| server_test.go | ||
| util.go | ||