Repository navigation
Conversation
|
Thank you for your contribution. Since you are not yet a member of the Ceph organization with write permissions on ceph/ceph.git, our CI will not automatically run. Any member of the Ceph organization may label this PR |
|
@Amitgb14 The problem is that the admin path to process a bucket was setting the |
|
There’s some related LC work in #71453 (reverting 541d13a / the multi-RGW As far as I can tell, that revert doesn’t set The changes look independent to me and should hopefully merge cleanly together. |
|
Hi @RaminNietzsche and @kchheda3, I have reworked the patch to initialize start_time only when it is unset, so an ad-hoc run never overwrites a timestamp the periodic worker recorded. I've added a regression test in a second commit. |
|
@kchheda3, could you please review the changes? |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
@ceph/rgw |
RaminNietzsche
left a comment
There was a problem hiding this comment.
Thanks for the rework. Preserving an existing start_time addresses the "ad-hoc must not overwrite the scheduled session" concern for buckets the worker has already processed.
One case still changes scheduled behaviour: for a bucket that has never been processed, the first lc process --bucket now stores today's start_time with COMPLETE, so the next scheduled pass hits already_run_today() and skips the bucket for the day (before this change, already_run_today(0) was false). That is probably fine since the bucket was just processed, but it is exactly the interaction @kchheda3 raised, so it would be good to confirm it is intended and mention it in the commit message.
Smaller points:
- Could the workunit also cover the scheduled interaction: an ad-hoc run followed by
lc process(no--bucket) withrgw_lc_debug_interval, asserting the expected skip or process? - The first assertion pins the
Thu, 01 Jan 1970display for a never-processed entry; that will break iflc listlater prints something nicer for an unset value. - Nit:
ceph_clock_now().sec()would make theutime_ttouint64_tconversion explicit.
The single-bucket lifecycle path used by 'radosgw-admin lc process
--bucket' writes the LC pool entry with only the status updated,
leaving start_time at its default-initialized value of 0 for buckets
that have never been processed by the periodic LC worker. As a
result, 'radosgw-admin lc list' displays "started: Thu, 01 Jan 1970
00:00:00 GMT" for such entries, and an entry left at 0 while
PROCESSING is treated as an expired session by the periodic worker.
Initialize entry.start_time before writing the entry, but only when
it has never been set. An ad-hoc run must not overwrite a timestamp
that is already recorded for the entry, since already_run_today() and
expired_session() in the periodic-shard path read that value; a
second ad-hoc run therefore leaves 'started' unchanged.
For a bucket that has never been processed, the first ad-hoc run now
records start_time, so a scheduled pass later the same day sees
COMPLETE and already_run_today() and skips the bucket. This is
intended: the bucket was just processed. Buckets already processed by
the periodic worker keep their existing start_time, so their schedule
is unchanged. Likewise, if that first ad-hoc run is interrupted while
PROCESSING, the entry is no longer treated as immediately stale
(start_time == 0); expired_session() clears it on a later worker
cycle, as for an interrupted scheduled run.
Before,
[
{
"bucket": ":mybucket:dc59444a-db3c-4b42-a029-1cc805136e06.4243.1",
"started": "Thu, 01 Jan 1970 00:00:00 GMT",
"status": "COMPLETE"
}
]
After,
[
{
"bucket": ":mybucket:dc59444a-db3c-4b42-a029-1cc805136e06.4243.1",
"started": "Thu, 03 Sep 2026 06:33:00 GMT",
"status": "COMPLETE"
}
]
Fixes: https://tracker.ceph.com/issues/80264
Signed-off-by: Amit Ghadge <[email protected]>
Adds a workunit covering the 'started' value reported by
'radosgw-admin lc list' and its interaction with scheduled processing:
- an entry that has never been processed is UNINITIAL
- an ad-hoc 'lc process --bucket' initializes 'started'
- a second ad-hoc run does not overwrite it
- a scheduled 'lc process' in the same rgw_lc_debug_interval skips
the bucket (already_run_today())
- a scheduled 'lc process' in a later interval processes it
Signed-off-by: Amit Ghadge <[email protected]>
|
Thanks @RaminNietzsche for your feedback. I'm started working on the suggested changes. |
|
jenkins test make check |
The single-bucket lifecycle path used by 'radosgw-admin lc process --bucket' writes the LC pool entry with only the status updated, leaving start_time at its default-initialized value of 0 for buckets that have never been processed by the periodic LC worker. As a result, 'radosgw-admin lc list' displays "started: Thu, 01 Jan 1970 00:00:00 GMT" for such entries, and stale-session detection in expired_session() compares against a bogus timestamp.
Stamp entry.start_time with the current time before writing the entry, matching RGWLC::process() for the periodic-shard path.
Before,
After,
Fixes: https://tracker.ceph.com/issues/80264
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.