Conveyor Finisher fails to retry requests in the "protocol mismatch" state
Hi,

Even with conveyor.retry_protocol_mismatches set to True, the finisher seems to fail to retry protocol mismatch errors at all (it just ignores them). This seems to be handled by these lines:
https://github.com/rucio/rucio/blob/916987976a1f994a64e4ef3dce837b49141a8f1b/lib/rucio/daemons/conveyor/finisher.py#L215
https://github.com/rucio/rucio/blob/916987976a1f994a64e4ef3dce837b49141a8f1b/lib/rucio/daemons/conveyor/finisher.py#L278

But it never gets any requests in the MISMATCH_SCHEME state, seemingly because this constant isn't included in the main database query filter here:
https://github.com/rucio/rucio/blob/916987976a1f994a64e4ef3dce837b49141a8f1b/lib/rucio/daemons/conveyor/finisher.py#L121-L129

Would it be possible for this to be fixed?

Regards,
Simon

diff --git a/lib/rucio/daemons/conveyor/finisher.py b/lib/rucio/daemons/conveyor/finisher.py
index 0a69bcde7..acbcaf234 100644
--- a/lib/rucio/daemons/conveyor/finisher.py
+++ b/lib/rucio/daemons/conveyor/finisher.py
@@ -17,7 +17,7 @@
 # - Mario Lassnig <mario.lassnig@cern.ch>, 2015-2019
 # - Vincent Garonne <vgaronne@gmail.com>, 2015-2018
 # - Martin Barisits <martin.barisits@cern.ch>, 2015-2019
-# - Cedric Serfon <cedric.serfon@cern.ch>, 2017-2019
+# - Cedric Serfon <cedric.serfon@cern.ch>, 2017-2020
 # - Hannes Hansen <hannes.jakob.hansen@cern.ch>, 2018
 # - Robert Illingworth <illingwo@fnal.gov>, 2019
 # - Andrew Lister <andrew.lister@stfc.ac.uk>, 2019
@@ -119,8 +119,10 @@ def finisher(once=False, sleep_time=60, activities=None, bulk=100, db_bulk=1000)
                 logging.debug('%s Working on activity %s', prepend_str, activity)
                 time1 = time.time()
                 reqs = request_core.get_next(request_type=[RequestType.TRANSFER, RequestType.STAGEIN, RequestType.STAGEOUT],
-                                             state=[RequestState.DONE, RequestState.FAILED, RequestState.LOST, RequestState.SUBMITTING,
-                                                    RequestState.SUBMISSION_FAILED, RequestState.NO_SOURCES, RequestState.ONLY_TAPE_SOURCES],
+                                             state=[RequestState.DONE, RequestState.FAILED,
+                                                    RequestState.LOST, RequestState.SUBMITTING,
+                                                    RequestState.SUBMISSION_FAILED, RequestState.NO_SOURCES,
+                                                    RequestState.ONLY_TAPE_SOURCES, RequestState.MISMATCH_SCHEME],
                                              limit=db_bulk,
                                              older_than=datetime.datetime.utcnow(),
                                              total_workers=heart_beat['nr_threads'] - 1,
['lib/rucio/daemons/conveyor/finisher.py']