Skip to content

set mtime directly while putting the file - #13823

Closed
DeepDiver1975 wants to merge 2 commits into
masterfrom
update-mtime-on-file_put_contents
Closed

DeepDiver1975 wants to merge 2 commits into
masterfrom
update-mtime-on-file_put_contents

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Contributor

fixes #13498
Kind of research project to see if we can save some executions ...

TODO:

  • actually profile the executions
  • test with desktop client if this continues to work
  • write proper unit tests
  • @icewind1991 please review from a conceptual POV

@DeepDiver1975 DeepDiver1975 added this to the 8.1-next milestone Feb 2, 2015
@PVince81

PVince81 commented Feb 9, 2015

Copy link
Copy Markdown
Contributor

Oh, you did this too ?

Just submitted #13985

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

well - @PVince81 - your change is not that deep 😉

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure I understand why this addition is needed ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

touch goes down to the physical file - but because update() is called anyhow there is no need to save data in the cache twice

does that make sense?

https://github.com/owncloud/core/pull/13823/files#diff-d9747e68e80ce288dcea911cb8607546R411

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok I see, so basically saving a SQL query

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok I see, so basically saving a SQL query

indeed

@PVince81

PVince81 commented Feb 9, 2015

Copy link
Copy Markdown
Contributor

You seem to have missed the case in "createFileChunked" ?
In that place it would put together the file with fopen() instead of file_put_contents().

Considering that your PR is better than mine, we could cherry-pick 94eb190 here ?

@DeepDiver1975
DeepDiver1975 force-pushed the update-mtime-on-file_put_contents branch from 3a8291b to 0f6058e Compare February 19, 2015 15:07
@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

@PVince81 done

@ghost

ghost commented Feb 19, 2015

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/9779/
Test PASSed.

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: No issues found

@DeepDiver1975 DeepDiver1975 changed the title [WIP] set mtime directly while putting the file set mtime directly while putting the file Mar 4, 2015
@MorrisJobke

Copy link
Copy Markdown
Contributor

@DeepDiver1975 What about unit tests?

@guruz

guruz commented Mar 13, 2015

Copy link
Copy Markdown
Contributor

Please ping us on owncloud/client#2252 when merged, thanks :)

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

@DeepDiver1975 What about unit tests?

that's a pain - the request object is not injected into node/file/directory class.

I'd need to inject the request into the object tree and from there into any file and directory class.

Feels so wrong ....

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

@PVince81 let's have some brain storming on this - THX

@VincentvgNn

Copy link
Copy Markdown

@DeepDiver1975 @PVince81
Today I did a fresh reliability test using server 8.0.2 and client 1.8.0.4933-nightly20150408.
I uploaded and shared 1400 files / 400 folders and got 2 files with the wrong mtime stored on the server.
So I still cannot release ownCloud for serious use.

Can this solution be introduced earlier than in server 8.1 (193 open issues)?
Maybe in 8.0.3 (7 open issues)?

Thanks a lot.

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

Can this solution be introduced earlier than in server 8.1 (193 open issues)?
Maybe in 8.0.3 (7 open issues)?

no - changes always go into master branch first - afterwards we decide if backporting to a stable branch is reasonable

@DeepDiver1975 DeepDiver1975 modified the milestones: 8.2-next, 8.1-current Apr 13, 2015
@ghost

ghost commented Apr 30, 2015

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/12044/
🚀 Test PASSed.🚀
chuck

@MorrisJobke

Copy link
Copy Markdown
Contributor

@DeepDiver1975 Needs a rebase

@PVince81

PVince81 commented Sep 1, 2015

Copy link
Copy Markdown
Contributor

Move to 9.0 ?

@PVince81

Copy link
Copy Markdown
Contributor

Needs rebase, there are conflicts

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

The approach no longer works since file.php uses now fopen and no longer file_put_contents -> close

@DeepDiver1975
DeepDiver1975 deleted the update-mtime-on-file_put_contents branch September 22, 2015 10:26
@MorrisJobke MorrisJobke removed this from the 8.2-current milestone Sep 22, 2015
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 10, 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.

touch file early after upload to avoid having wrong time

6 participants