[LU-14158] lfs changelog do not display old changelog after changelog_catalog wrapped arround Created: 27/Nov/20  Updated: 20/Dec/22  Resolved: 22/Dec/20

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.13.0, Lustre 2.12.3, Lustre 2.14.0, Lustre 2.12.4, Lustre 2.12.5
Fix Version/s: Lustre 2.14.0

Type: Bug Priority: Minor
Reporter: Etienne Aujames Assignee: Etienne Aujames
Resolution: Fixed Votes: 0
Labels: None
Environment:

VMs + ldiskfs


Attachments: File changelog_catalog.tgz    
Issue Links:
Gantt End to Start
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

The following source code introduce an regression when the "changelog_catalog" reach the end of llog catalog:

284 static int chlg_load(void *args)                                                                     
285 {                                                                                                    
.....                                                                                     
293                                                                                                      
294         crs->crs_last_catidx = -1;  <-----                                                                
295         crs->crs_last_idx = 0;
.....
332         rc = llog_cat_process(NULL, llh, chlg_read_cat_process_cb, crs,
333                                 crs->crs_last_catidx, crs->crs_last_idx);

The -1 value or LLOG_CAT_FIRST for startcat is special value that scan the a llog catalog from index 0 to lgh_last_idx. It will not process catalog records at the end of catalog if the catalog has wrapped arround ( from llh_cat_idx to the end of catalog indexes). See llog_cat_process_or_fork for more information.

So when the message "llog_cat_process_or_fork: catlog "DFID" crosses index zero" by changelogs client, the client will "lost" all the old changelogs that was not synchronized.

The polling mode is not concerned by this issue (only the first iteration).

I  reproduced this bug on my VMs. I am attaching to this ticket the changelogs files that I used for my tests.



 Comments   
Comment by Gerrit Updater [ 27/Nov/20 ]

Etienne AUJAMES (eaujames@ddn.com) uploaded a new patch: https://review.whamcloud.com/40786
Subject: LU-14158 mdc: process changelogs_catalog from the oldest rec
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c94397960f105fc70e5f6e5c38eb4664bd6976ee

Comment by Gerrit Updater [ 22/Dec/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40786/
Subject: LU-14158 mdc: process changelogs_catalog from the oldest rec
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: ad4c8633498848c2f388942916830b021b5ba350

Comment by Peter Jones [ 22/Dec/20 ]

Landed for 2.14

Comment by Gerrit Updater [ 05/Jan/21 ]

Etienne AUJAMES (eaujames@ddn.com) uploaded a new patch: https://review.whamcloud.com/41132
Subject: LU-14158 tests: process changelogs_catalog from the oldest rec
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 76fa09d6b36090871228d61041d08fdae41b1f01

Comment by Gerrit Updater [ 08/Jan/21 ]

Etienne AUJAMES (eaujames@ddn.com) uploaded a new patch: https://review.whamcloud.com/41173
Subject: LU-14158 mdc: process changelogs_catalog from the oldest rec
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: 551f775afd14bccf88a847c0f20c899a68b08ff4

Generated at Sat Feb 10 03:07:20 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.