Skip to content

Conversation

@tomneedham
Copy link
Contributor

@tomneedham tomneedham commented Sep 18, 2017

Backport of #28253 for stable9 (ignore the branch name, rebased for stable9)

@tomneedham tomneedham self-assigned this Sep 18, 2017
@tomneedham tomneedham changed the title 9.0.8 repair step [9.0.8] Filecache repair step Sep 18, 2017
@tomneedham tomneedham requested a review from butonic September 18, 2017 11:21
@tomneedham
Copy link
Contributor Author

Do we have console output access for repair steps? I just mapped it over to a OCP\ILogger instance for now

@tomneedham
Copy link
Contributor Author

Needs a couple of fixes from #28253 then this should work here too 🎉

@tomneedham
Copy link
Contributor Author

Ok let's see how this goes - I think the tests might need some more tweaking with regards to output / repairstep differences

@tomneedham
Copy link
Contributor Author

Ahh yes we dont have createMock()

@tomneedham
Copy link
Contributor Author

tomneedham commented Sep 29, 2017

detached subtree repair step fails on oracle... where it checks if the entry has been reattached

@tomneedham
Copy link
Contributor Author

Was missing the last fix from vincent 4c15721

@tomneedham
Copy link
Contributor Author

Let's wait for CI here

@tomneedham
Copy link
Contributor Author

Jenkins passed 💪

@PVince81
Copy link
Contributor

@tomneedham is this up to date with the latest changes from the stable10 PR ?

before merging stable9 would be good to also have stable9.1 backport and merge that one first

Vincent Petry and others added 14 commits November 6, 2017 18:28
Whenever a parent-child relationship describes a specific path but the
entry's actual path is different, this new repair step will adjust it.

In the event where another entry already exists under that name, the
latter is deleted and replaced by the above entry. This should help
preserve the metadata associated with the original entry.
When fixing failed cross-storage moves in the file cache and using the
storage id filter, we filter by target storage for phase 1. However, we
also need to fix the source storages in phase 2. To do so, a list of
affected source storages is now gathered in phase 1 to be run on phase
2.
This instead of iterating over all storages which is way less efficient
due to the 1-N nature of potential failed cross-storage moves that we
are repairing.

If singleuser mode is enabled and "--all --repair" is passed, all
storages will be repaired in bulk (no repair filter). If not, it will
fall back to iterating over each storage which is slower.
@tomneedham tomneedham changed the title [9.0.8] Filecache repair step [stable9] Filecache repair step Nov 6, 2017
@tomneedham
Copy link
Contributor Author

Rebased and added path hash commit for performance

# add an extra line when verbose is set to optical separate users
if ($verbose) {$output->writeln(""); }
$output->writeln("Starting scan for user $user_count out of $users_total ($user)");
$r = $shouldRepairStoragesIndividually ? ' (and repair)' : '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember these changes, did you add them to master/stable10 as well ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$qb->execute();

$text = "Fixed file cache entry with fileid $fileId, set wrong parent \"$wrongParentId\" to \"$correctParentId\"";
$out->advance(1, $text);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know we had the ability to display progress in stable9, good

}
}

class LogOutput {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bäh... in my original backport I just removed progress logging.

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look ok, but I feel slightly disturbed by the hard-coded LogOutput class. Maybe just remove all logging ?

The other alternative is to use the event emitter like we do in other repair steps. But that might not work when trying to log to the console when run from the scan command.

@PVince81
Copy link
Contributor

PVince81 commented Nov 6, 2017

Weird JS setup failures, same like #29407 (comment)

@PVince81
Copy link
Contributor

PVince81 commented Nov 6, 2017

Will require #29477 for JS tests to pass and maybe a PR resubmit to clean the env.

@PVince81
Copy link
Contributor

PVince81 commented Nov 7, 2017

Resend as #29489 to fix JS env issue

@PVince81 PVince81 closed this Nov 7, 2017
@PVince81 PVince81 deleted the 9.0.8-repair-step branch November 7, 2017 09:13
@lock
Copy link

lock bot commented Aug 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants