Repository navigation
frontend: send a billing record when a file is deleted - #8299
Open
chubnastia wants to merge 1 commit into
Open
chubnastia wants to merge 1 commit into
chubnastia wants to merge 1 commit into
Conversation
Motivation: Files and links deleted through the REST API (and so through dCacheView) get no `remove` record in billing, unlike in the other doors. Modification: - The delete asks PnfsManager for the PNFS ID, type and size of the deleted entry. - FileResources then sends a `remove` DoorRequestInfoMessage to the billing topic, with the path, PNFS ID, size, client, client chain and its cell address (via CellIdentityAware). Directories are not billed, as in the other doors. A failure to send is logged and does not fail the delete. - The record names the requesting user, even when an admin deletes with the admin role and the delete runs as root. - New property frontend.service.billing.topic (default BillingTopic), checked in frontend.batch and used by a new CellStub in frontend.xml. The existing frontend.service.billing is the billing queue, used for reading billing data. - Add FileResourcesTest. Result: Deletes through the REST API and dCacheView show up in billing. Fixes: #8246 Target: master, 12.1, 12.0, 11.2 Require-book: no Require-notes: yes Acked-by: Tigran Mkrtchyan The test uses Subject.doAs, as this branch builds for Java 17. (cherry picked from commit 07549a4)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
Files and links deleted through the REST API (and so through dCacheView) get no
removerecord in billing, unlike in the other doors.Modification:
removeDoorRequestInfoMessage to the billing topic, with the path, PNFS ID, size, client, client chain and its cell address (via CellIdentityAware). Directories are not billed, as in the other doors. A failure to send is logged and does not fail the delete.Result:
Deletes through the REST API and dCacheView show up in billing.
Fixes: #8246
Target: master, 12.1, 12.0, 11.2
Require-book: no
Require-notes: yes
Acked-by: Tigran Mkrtchyan
The test uses Subject.doAs, as this branch builds for Java 17. (cherry picked from commit 07549a4)