Skip to content

Commit

Permalink
Skip jobs with too large (>=8MB) FJR
Browse files Browse the repository at this point in the history
  • Loading branch information
amaltaro committed Apr 21, 2023
1 parent 153879b commit cb6b352
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/python/WMCore/JobStateMachine/ChangeState.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import time

from WMCore.DataStructs.WMObject import WMObject
from WMCore.Database.CMSCouch import CouchNotFoundError, CouchError
from WMCore.Database.CMSCouch import CouchNotFoundError, CouchError, CouchRequestTooLargeError
from WMCore.Database.CMSCouch import CouchServer
from WMCore.JobStateMachine.SummaryDB import updateSummaryDB
from WMCore.JobStateMachine.Transitions import Transitions
Expand Down Expand Up @@ -354,7 +354,13 @@ def recordInCouch(self, jobs, newstate, oldstate, updatesummary=False):
"archivestatus": archStatus,
"fwjr": jsonFWJR,
"type": "fwjr"}
self.fwjrdatabase.queue(fwjrDocument, timestamp=True, callback=discardConflictingDocument)
try:
self.fwjrdatabase.queue(fwjrDocument, timestamp=True, callback=discardConflictingDocument)
except CouchRequestTooLargeError as exc:
errMsg = f"FJR for jobid: {fwjrDocument['jobid']} will be skipped. Error: {str(exc)}"
logging.error(errMsg)
except Exception:
raise

updateSummaryDB(self.statsumdatabase, job)

Expand Down

0 comments on commit cb6b352

Please sign in to comment.