Crash when enabling multihop mode
Motivation
----------
The submitter crash when enabling multihop mode






diff --git a/lib/rucio/core/request.py b/lib/rucio/core/request.py
index c8d5f92b6..02ef5f52d 100644
--- a/lib/rucio/core/request.py
+++ b/lib/rucio/core/request.py
@@ -12,7 +12,7 @@
 # - Wen Guan, <wen.guan@cern.ch>, 2014-2016
 # - Joaquin Bogado, <jbogadog@cern.ch>, 2016
 # - Thomas Beermann, <thomas.beermann@cern.ch>, 2016
-# - Cedric Serfon, <cedric.serfon@cern.ch>, 2017-2019
+# - Cedric Serfon, <cedric.serfon@cern.ch>, 2017-2020
 # - Hannes Hansen, <hannes.jakob.hansen@cern.ch>, 2018-2019
 # - Andrew Lister, <andrew.lister@stfc.ac.uk>, 2019
 #
@@ -485,6 +485,7 @@ def set_request_state(request_id, new_state, transfer_id=None, transferred_at=No
 
     record_counter('core.request.set_request_state')
 
+    rowcount = 0
     try:
         update_items = {'state': new_state, 'updated_at': datetime.datetime.utcnow()}
         if transferred_at:
diff --git a/lib/rucio/core/transfer.py b/lib/rucio/core/transfer.py
index 187df6c2e..57ef2df68 100644
--- a/lib/rucio/core/transfer.py
+++ b/lib/rucio/core/transfer.py
@@ -8,7 +8,7 @@
 # Authors:
 # - Martin Barisits, <martin.barisits@cern.ch>, 2017-2018
 # - Mario Lassnig, <mario.lassnig@cern.ch>, 2017-2018
-# - Cedric Serfon, <cedric.serfon@cern.ch>, 2018-2019
+# - Cedric Serfon, <cedric.serfon@cern.ch>, 2018-2020
 # - Hannes Hansen, <hannes.jakob.hansen@cern.ch>, 2018
 # - Robert Illingworth, <illingwo@fnal.gov>, 2019
 # - Andrew Lister, <andrew.lister@stfc.ac.uk>, 2019
@@ -1038,7 +1038,11 @@ def get_transfer_requests_and_source_replicas(total_workers=0, worker_number=0,
                         # Need to fail all the intermediate requests + the initial one and exit the multihop loop
                         logging.warning('Multihop : A request already exists for the transfer between %s and %s. Will cancel all the parent requests', source_rse_name, dest_rse_name)
                         parent_requests.append(req_id)
-                        set_requests_state(request_ids=parent_requests, new_state=RequestState.FAILED, session=session)
+                        try:
+                            set_requests_state(request_ids=parent_requests, new_state=RequestState.FAILED, session=session)
+                        except UnsupportedOperation:
+                            logging.error('Multihop : Cannot cancel all the parent requests : %s', str(parent_requests))
+
                         # Remove from the transfer dictionary all the requests
                         for cur_req_id in parent_requests:
                             transfers.pop(cur_req_id, None)
['lib/rucio/core/request.py', 'lib/rucio/core/transfer.py']