Bug 1262692

Summary: [BACKUP]: Output file has new entry for file creation before its parent creation
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Rahul Hinduja <rhinduja>
Component: glusterfindAssignee: Bug Updates Notification Mailing List <rhs-bugs>
Status: CLOSED DEFERRED QA Contact: Sweta Anandpara <sanandpa>
Severity: low Docs Contact:
Priority: low    
Version: rhgs-3.1CC: rhs-bugs
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-23 06:26:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rahul Hinduja 2015-09-14 06:23:49 UTC
Description of problem:
=======================

Created data set by following cli:

for i in {1..999} ; do mkdir dir.$i ; touch dir.$i/file.$i ; done

It created directory with dir.$i and created a file inside it. But when the output file is generated using glusterfind pre. For some files, the order for file creation is before its directory creation.

<File>
<Dir><File>

Output file entries with line number:
=====================================
File Creation:

    933 NEW dir.542%2F%2Ffile.542
    934 NEW dir.544%2F%2Ffile.544
    935 NEW dir.545%2F%2Ffile.545
    936 NEW dir.546%2F%2Ffile.546

Directory creation:

   1090 NEW dir.544
   1091 NEW dir.545
   1092 NEW dir.546
   1093 NEW dir.547
   1094 NEW dir.548
   1095 NEW dir.549


The order difference is for few files, This file if used in backup will fail as the parent directory doesn't exist. OR will have inconsistent data.

Version-Release number of selected component (if applicable):
=============================================================

glusterfs-3.7.1-14.el7rhgs.x86_64


How reproducible:
=================
Always


Steps to Reproduce:
===================
1. Create number of directories and files inside them
2. Use glusterfind pre to generate the output file


Actual results:
===============
Order of some file is incorrect. Entry for file creation is before the creation of parent directory.

Expected results:
=================
Entry should be first for parent directory followed by entry for file

Comment 2 Yaniv Kaul 2019-09-23 06:26:06 UTC
Closing, no one touched this since 2015 or so.