Skip to content

Commit

Permalink
Database: Add query hint to update_replicas query; Fix #4204
Browse files Browse the repository at this point in the history
  • Loading branch information
bari12 committed Jan 5, 2021
1 parent 0eea5ea commit 30bfcc4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/rucio/core/replica.py
Original file line number Diff line number Diff line change
Expand Up @@ -1831,6 +1831,7 @@ def list_and_mark_unlocked_replicas(limit, bytes=None, rse_id=None, delay_second
models.RSEFileAssociation.rse_id == rse_id))
for chunk in chunks(replica_clause, 100):
session.query(models.RSEFileAssociation).filter(or_(*chunk)).\
with_hint(models.RSEFileAssociation, text="INDEX(REPLICAS REPLICAS_PK)", dialect_name='oracle').\
update({'updated_at': datetime.utcnow(), 'state': ReplicaState.BEING_DELETED}, synchronize_session=False)

return rows
Expand Down

0 comments on commit 30bfcc4

Please sign in to comment.