Problem: backlog_reassign_delay is defunct but still listed (#2332)

* Fixed 2 PEP257 compliance errors

* Upgrade Tendermint to 0.19.7 except for Docker image, which is still at 0.19.2

* Problem: backlog_reassign_delay is defunct but still listed

Solution: remove all mentions of & calls for backlog_reassign_delay
This commit is contained in:
Troy McConaghy 2018-06-04 12:19:24 +02:00 committed by Zachary Bowen
parent 1753a7019b
commit 241db4ee48
12 changed files with 4 additions and 48 deletions

View File

@ -106,7 +106,6 @@ config = {
'private': None,
},
'keyring': [],
'backlog_reassign_delay': 120,
'log': {
'file': log_config['handlers']['file']['filename'],
'error_file': log_config['handlers']['errors']['filename'],

View File

@ -83,10 +83,6 @@ def run_configure(args):
val = conf['database'][key]
conf['database'][key] = input_on_stderr('Database {}? (default `{}`): '.format(key, val), val)
val = conf['backlog_reassign_delay']
conf['backlog_reassign_delay'] = input_on_stderr(
'Stale transaction reassignment delay (in seconds)? (default `{}`): '.format(val), val)
if config_path != '-':
bigchaindb.config_utils.write_config(conf, config_path)
else:

View File

@ -30,7 +30,7 @@ class Bigchain(object):
TX_IN_BACKLOG = 'backlog'
"""return if transaction is in backlog"""
def __init__(self, public_key=None, private_key=None, keyring=[], connection=None, backlog_reassign_delay=None):
def __init__(self, public_key=None, private_key=None, keyring=[], connection=None):
"""Initialize the Bigchain instance
A Bigchain instance has several configuration parameters (e.g. host).
@ -56,10 +56,6 @@ class Bigchain(object):
self.me_private = private_key or bigchaindb.config['keypair']['private']
self.nodes_except_me = keyring or bigchaindb.config['keyring']
if backlog_reassign_delay is None:
backlog_reassign_delay = bigchaindb.config['backlog_reassign_delay']
self.backlog_reassign_delay = backlog_reassign_delay
consensusPlugin = bigchaindb.config.get('consensus_plugin')
if consensusPlugin:
@ -140,7 +136,7 @@ class Bigchain(object):
backlog after some amount of time specified in the configuration
"""
return backend.query.get_stale_transactions(self.connection, self.backlog_reassign_delay)
return backend.query.get_stale_transactions(self.connection)
def validate_transaction(self, transaction):
"""Validate a transaction.

View File

@ -24,7 +24,6 @@ For convenience, here's a list of all the relevant environment variables (docume
`BIGCHAINDB_WSSERVER_ADVERTISED_HOST`<br>
`BIGCHAINDB_WSSERVER_ADVERTISED_PORT`<br>
`BIGCHAINDB_CONFIG_PATH`<br>
`BIGCHAINDB_BACKLOG_REASSIGN_DELAY`<br>
`BIGCHAINDB_LOG`<br>
`BIGCHAINDB_LOG_FILE`<br>
`BIGCHAINDB_LOG_ERROR_FILE`<br>
@ -201,21 +200,6 @@ export BIGCHAINDB_WSSERVER_ADVERTISED_PORT=443
}
```
## backlog_reassign_delay
Specifies how long, in seconds, transactions can remain in the backlog before being reassigned. Long-waiting transactions must be reassigned because the assigned node may no longer be responsive. The default duration is 120 seconds.
**Example using environment variables**
```text
export BIGCHAINDB_BACKLOG_REASSIGN_DELAY=30
```
**Default value (from a config file)**
```js
"backlog_reassign_delay": 120
```
## log
The `log` key is expected to point to a mapping (set of key/value pairs)

View File

@ -206,11 +206,6 @@ spec:
configMapKeyRef:
name: vars
key: bigchaindb-wsserver-advertised-scheme
- name: BIGCHAINDB_BACKLOG_REASSIGN_DELAY
valueFrom:
configMapKeyRef:
name: bdb-config
key: bigchaindb-backlog-reassign-delay
- name: BIGCHAINDB_DATABASE_MAXTRIES
valueFrom:
configMapKeyRef:

View File

@ -106,10 +106,6 @@ data:
# BigchainDB instance authentication user name
bdb-user: "<user name>"
# bigchaindb-backlog-reassign-delay is the number of seconds a transaction
# can remain in the backlog before being reassigned.
bigchaindb-backlog-reassign-delay: "120"
# bigchaindb-database-maxtries is the maximum number of times that BigchainDB
# will try to establish a connection with the database backend.
# If it is set to 0, then it will try forever.

View File

@ -59,8 +59,6 @@ spec:
value: "EEWUAhsk94ZUHhVw7qx9oZiXYDAWc9cRz93eMrsTG4kZ"
- name: BIGCHAINDB_KEYPAIR_PRIVATE
value: "3CjmRhu718gT1Wkba3LfdqX5pfYuBdaMPLd7ENUga5dm"
- name: BIGCHAINDB_BACKLOG_REASSIGN_DELAY
value: "120"
- name: BIGCHAINDB_DATABASE_MAXTRIES
value: "3"
- name: BIGCHAINDB_DATABASE_CONNECTION_TIMEOUT

View File

@ -339,10 +339,6 @@ data:
# BigchainDB instance authentication user name
bdb-user: "${bdb_user}"
# bigchaindb-backlog-reassign-delay is the number of seconds a transaction
# can remain in the backlog before being reassigned.
bigchaindb-backlog-reassign-delay: "120"
# bigchaindb-database-maxtries is the maximum number of times that BigchainDB
# will try to establish a connection with the database backend.
# If it is set to 0, then it will try forever.

View File

@ -37,7 +37,6 @@ def mock_bigchaindb_backup_config(monkeypatch):
config = {
'keypair': {},
'database': {'host': 'host', 'port': 12345, 'name': 'adbname'},
'backlog_reassign_delay': 5
}
monkeypatch.setattr('bigchaindb._config', config)

View File

@ -543,7 +543,7 @@ class TestBigchainApi(object):
b.write_transaction(tx)
# retrieve the transaction
response = list(query.get_stale_transactions(b.connection, 0))[0]
response = list(query.get_stale_transactions(b.connection))[0]
# check if the assignee is the current node
assert response['assignee'] == b.me
@ -570,7 +570,7 @@ class TestBigchainApi(object):
b.write_transaction(tx)
# retrieve the transaction
response = query.get_stale_transactions(b.connection, 0)
response = query.get_stale_transactions(b.connection)
# check if the assignee is one of the _other_ federation nodes
for tx in response:

View File

@ -170,7 +170,6 @@ def test_autoconfigure_read_both_from_file_and_env(monkeypatch, request, ssl_con
'database': {
'host': DATABASE_HOST
},
'backlog_reassign_delay': 5,
'log': {
'level_console': 'debug',
},
@ -290,7 +289,6 @@ def test_autoconfigure_read_both_from_file_and_env(monkeypatch, request, ssl_con
'private': None,
},
'keyring': KEYRING.split(':'),
'backlog_reassign_delay': 5,
'log': {
'file': LOG_FILE,
'error_file': log_config['handlers']['errors']['filename'],

View File

@ -23,7 +23,6 @@ def config(request, monkeypatch):
},
'keyring': [],
'CONFIGURED': True,
'backlog_reassign_delay': 30,
}
monkeypatch.setattr('bigchaindb.config', config)