Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fix(performance): Do not set up filesystem on every call" #36788

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

* @throws ServiceUnavailable
*/
private function createFileChunked($data) {
[$path, $name] = \Sabre\Uri\split($this->path);

Check notice

Code scanning / Psalm

UndefinedFunction

Function Sabre\Uri\split does not exist

if ($chunk_handler->isComplete()) {
/** @var Storage $storage */
[$storage,] = $this->fileView->resolvePath($path);

Check notice

Code scanning / Psalm

DeprecatedClass

Class OCP\Files\Storage is marked as deprecated
if (isset($this->request->server['HTTP_OC_CHECKSUM'])) {
$checksum = trim($this->request->server['HTTP_OC_CHECKSUM']);
$this->fileView->putFileInfo($targetPath, ['checksum' => $checksum]);
} elseif ($info->getChecksum() !== null && $info->getChecksum() !== '') {

Check notice

Code scanning / Psalm

RedundantConditionGivenDocblockType

Docblock-defined type string can never contain null
if (isset($this->request->server['HTTP_OC_CHECKSUM'])) {
$checksum = trim($this->request->server['HTTP_OC_CHECKSUM']);
$this->fileView->putFileInfo($targetPath, ['checksum' => $checksum]);
} elseif ($info->getChecksum() !== null && $info->getChecksum() !== '') {

Check notice

Code scanning / Psalm

PossiblyFalseReference

Cannot call method getChecksum on possibly false value

$this->fileView->unlockFile($targetPath, ILockingProvider::LOCK_SHARED);

return $info->getEtag();

Check notice

Code scanning / Psalm

PossiblyFalseReference

Cannot call method getEtag on possibly false value
* @throws \Sabre\DAV\Exception\BadRequest
*/
public function sendFileIdHeader($filePath, \Sabre\DAV\INode $node = null) {
// chunked upload handling
if (isset($_SERVER['HTTP_OC_CHUNKED'])) {
[$path, $name] = \Sabre\Uri\split($filePath);

Check notice

Code scanning / Psalm

UndefinedFunction

Function Sabre\Uri\split does not exist
private function resolveChunkFile($path) {
if (isset($_SERVER['HTTP_OC_CHUNKED'])) {
// resolve to real file name to find the proper node
[$dir, $name] = \Sabre\Uri\split($path);

Check notice

Code scanning / Psalm

UndefinedFunction

Function Sabre\Uri\split does not exist
throw new InsufficientStorage("Insufficient space in $path, $length required, $freeSpace available");
}
}
return true;
}

public function getFileChunking($info) {

Check notice

Code scanning / Psalm

MissingReturnType

Method OCA\DAV\Connector\Sabre\QuotaPlugin::getFileChunking does not have a return type, expecting OC_FileChunking
throw new InsufficientStorage("Insufficient space in $path, $length required, $freeSpace available");
}
}
return true;
}

public function getFileChunking($info) {

Check notice

Code scanning / Psalm

MissingParamType

Parameter $info has no provided type
Copy link
Contributor

@miaulalala miaulalala left a comment

Choose a reason for hiding this comment

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

😢

@miaulalala miaulalala merged commit 13ef475 into master Feb 21, 2023
@miaulalala miaulalala deleted the revert-36589-enh/perf-remove-icache branch February 21, 2023 08:22
@skjnldsv skjnldsv mentioned this pull request Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants