Skip to content

Commit

Permalink
Merge pull request #3166 from bari12/patch-3165-Core__Fix_backwards_c…
Browse files Browse the repository at this point in the history
…ompatibility_for_usage_and_limits

Core: Fix backwards compatibility for account usage and limits; Fix #3165
  • Loading branch information
bari12 committed Dec 4, 2019
2 parents 1b7e15f + b953075 commit bc92f48
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/rucio/daemons/conveyor/finisher.py
Expand Up @@ -408,7 +408,7 @@ def __update_bulk_replicas(replicas, session=None):
:returns commit_or_rollback: Boolean.
"""
try:
replica_core.update_replicas_states(replicas, nowait=True, add_tombstone=True, session=session)
replica_core.update_replicas_states(replicas, nowait=True, add_tombstone=False, session=session) # TODO: add_tombstone needs to be changed to True once set_tombstone is fixed
except ReplicaNotFound as error:
logging.warn('Failed to bulk update replicas, will do it one by one: %s', str(error))
raise ReplicaNotFound(error)
Expand All @@ -432,7 +432,7 @@ def __update_replica(replica, session=None):
"""

try:
replica_core.update_replicas_states([replica], nowait=True, add_tombstone=True, session=session)
replica_core.update_replicas_states([replica], nowait=True, add_tombstone=False, session=session) # TODO: add_tombstone needs to be changed to True once set_tombstone is fixed
if not replica['archived']:
request_core.archive_request(replica['request_id'], session=session)
logging.info("HANDLED REQUEST %s DID %s:%s AT RSE %s STATE %s", replica['request_id'], replica['scope'], replica['name'], replica['rse_id'], str(replica['state']))
Expand Down
2 changes: 1 addition & 1 deletion lib/rucio/web/rest/webpy/v1/account.py
Expand Up @@ -69,7 +69,7 @@
'/(.+)/usage/local/(.+)', 'LocalUsage',
'/(.+)/usage/global', 'GlobalUsage',
'/(.+)/usage/global/(.+)', 'GlobalUsage',
'/(.+)/usage', 'LocalUsage',
'/(.+)/usage/', 'LocalUsage',
'/(.+)/usage/(.+)', 'LocalUsage',
'/(.+)', 'AccountParameter',
'/?$', 'Account',
Expand Down
3 changes: 2 additions & 1 deletion lib/rucio/web/rest/webpy/v1/account_limit.py
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#
# Authors:
# - Martin Barisits <martin.barisits@cern.ch>, 2014
# - Martin Barisits <martin.barisits@cern.ch>, 2014-2019
# - Vincent Garonne <vincent.garonne@cern.ch>, 2017
# - Mario Lassnig <mario.lassnig@cern.ch>, 2018
# - Hannes Hansen <hannes.jakob.hansen@cern.ch>, 2018-2019
Expand All @@ -41,6 +41,7 @@
URLS = (
'/local/(.+)/(.+)', 'LocalAccountLimit',
'/global/(.+)/(.+)', 'GlobalAccountLimit',
'/(.+)/(.+)', 'LocalAccountLimit',
)


Expand Down

0 comments on commit bc92f48

Please sign in to comment.