Project

General

Profile

Actions

Feature #73328

closed
RJ YL

lua: when doing multi_object_delete there is no array of objects available in postrequest context

Feature #73328: lua: when doing multi_object_delete there is no array of objects available in postrequest context

Added by Rok Jaklic about 1 year ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
Reviewed:
Affected Versions:
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-3557-gde0445de1c
Released In:
Upkeep Timestamp:
2026-09-23T09:35:20+00:00
Tags:

Description

If we do delete_object, object is accessible in Request.Object.

Something similar (like Request.Objects[x].) should be available when we do multi_object_delete also.

JI Updated by J. Eric Ivancich about 1 year ago Actions #1

  • Tracker changed from Bug to Feature
  • Assignee set to Yuval Lifshitz
  • Regression deleted (No)
  • Severity deleted (3 - minor)

YL Updated by Yuval Lifshitz about 1 year ago Actions #2

  • Tags set to lua

YL Updated by Yuval Lifshitz 6 months ago Actions #3

can think of 2 binding options:
(1) expose the objects as an array

Request.Objects[x]

should give access to the "Object" similar to:
Request.Object

in regular delete request.
not that iterating through "Objects", as well as getting the number of objects via the "#" operator should also eb supported

(2) do not run the lua vm against the request in "rgw_process.cc", instead, run it inside the loop that iterated through the objects in multi-delete in:"rgw_op.cc", and execute a vm per object, with syntax similar to the existing one.
this would allow the same lua code to be used in delete and multi-delete without a change, but would hide the fact that we use multi-delete.
this will also require not running lua in "rgw_process.cc" for multi-delete requests. note that there is already a mechanism to avoid running lua based on the op type

YL Updated by Yuval Lifshitz 6 months ago Actions #4

@rokj would appriciate your feedback o nthe 2 options.

YL Updated by Yuval Lifshitz 3 months ago Actions #5

  • Status changed from New to Fix Under Review
  • Pull request ID set to 69792

UB Updated by Upkeep Bot 2 months ago Actions #6

  • Status changed from Fix Under Review to Resolved
  • Merge Commit set to de0445de1cd8e21851c02dd835d888a65d605232
  • Fixed In set to v21.3.0-3557-gde0445de1c
  • Upkeep Timestamp set to 2026-09-23T09:35:20+00:00
Actions

Also available in: PDF Atom