-
Notifications
You must be signed in to change notification settings - Fork 2.1k
64bit mtime #28067
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
64bit mtime #28067
Conversation
bfe7068 to
fd23d6a
Compare
db_structure.xml
Outdated
| <default></default> | ||
| <notnull>true</notnull> | ||
| <length>4</length> | ||
| <length>8</length> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to use the new DB migrations approach to make DB changes, don't reuse the old db_structure.xml.
See https://doc.owncloud.org/server/10.0/developer_manual/app/schema.html
|
If all databases can deal with it then why not. |
|
@PVince81 is that the correct way of changing the DB Structure? according to the documentation I can imagine 2 problems with that:
|
465aedb to
72a0fd5
Compare
|
rebased on current master |
phil-davis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, assuming the Jenkins runs some time and passes. As long as the actual storage filesystems also support setting 64-bit then that gets us well past the end of the sun and practical heat death of the universe.
http://ximalas.info/2015/03/10/when-does-the-64-bit-unix-time_t-really-end/
79ec6c7 to
ea4d869
Compare
ea4d869 to
5c47057
Compare
|
Would be good to do a quick test on a 32 bit system (VM or rasperry pi) to confirm that it doesn't break anything |
|
uh oh owncloud/files_texteditor#172 ?! do we need to support float mtimes ? |
|
We thought about this. Modern file systems happily keep a record of mtime and the like to some fractions of a second. e.g. I think something like: Rather than using float, the database could store the int nanoseconds (traditional unix timestamp seconds x 10^9). According to my calculations, (2^63)/(60 * 60 * 24 * 365 * 10^9) is about 292. That would allow storing times +-292 years from 1970. Enough for normal files, and dates that current people might have been born etc, Or it can store the current seconds (in 64 bit to include the beginning and end of the universe) and add another 64-bit field for the nanoseconds offset. That allows actual timestamps from ext4 and similar to be remembered in the database. Some issues are:
|
5c47057 to
8768900
Compare
|
I've run the unit tests on a 32bit system with PHP 5.6 and they are passing on sqlite & mysql |
PVince81
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine 👍
Please rebase once to refresh CI
8768900 to
898d970
Compare
|
rebased, @DeepDiver1975 are you happy with the changes? |
DeepDiver1975
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to rebase this one and see for conflicts
a43f5c2 to
a4bd660
Compare
a4bd660 to
bcf8c14
Compare
|
@DeepDiver1975 rebased the branch. |
|
@PVince81 shall we backport this? |
|
Later maybe, I don't feel safe about this |
|
@individual-it please backport for 10.0.4 so we can have it in an early beta |
|
Backport stable10 #28961 |
|
Note: the migration code is being moved from dav to core in #29120 |
|
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. |
Description
allow to store mtime as 64bit int
build on top of #28066
Related Issue
#23228
Motivation and Context
the database should hold 64bit int to be able to store dates after 2038
How Has This Been Tested?
run new tests against pgsql, mysql & sqlite on PHP 7.1
Types of changes
Checklist: