Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dcache-bulk,dcache-frontend: fix bug in tape/stage and in argument ex…
…traction from DB Motivation: See RT 10426 Inconsistencies in Pin Lifetime between dCache-like pinning https://rt.dcache.org/Ticket/Display.html?id=10426 It was noted that the diskLifetime value was always default for /tape/stage, unlike for /bulk-requests with -activity=PIN. It turns out the fundamental problem was that the frontend resource was neglecting to set the map of arguments on the request. Once this was done, however, a second problem was discovered. The serialized value in the database was not being parsed back into the correct JSON string. This has to do with the fact that that arguments is a <String, String> map, but the stringified value was now being used to store a JSON object string instead of a simple value, meaning that it contains the same delimiters as the top level map does (: and ,). Modification: Adding a surrounding '{' '}' to the value fetched from the database and parsing it as a JSONObject solved the problem. Result: The frontend resource now adds the arguments map as it should. Target: master Request: 8.2 Bug: #10426 Requires-notes: yes Patch: https://rb.dcache.org/r/13877/ Acked-by: Dmitry
- Loading branch information
Showing
3 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters