2018-12-12 06:27 CET

View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0005537Spring engineGeneralpublic2018-11-17 02:08
Reportergajop 
Assigned Togajop 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0005537: Changing modinfo.lua dependencies doesn't reset cache
DescriptionChanging the depends table in modinfo.lua should clear/force-update the cache for that archive and all depending on it. This isn't a new bug, it has been like this for as long as I can remember, and I'd like it to change.
TagsNo tags attached.
Attached Files

-Relationships
duplicate of 0004017closedgajop Spring (ArchiveScanner?) doesn't update ArchiveCache.lua when only modinfo.lua changes 
has duplicate 0003462closedKloot ArchiveCache.lua not updated when mod dependencies are changed 
+Relationships

-Notes

~0017513

silentwings (reporter)

+1

~0017514

Kloot (developer)

Last edited: 2017-04-26 12:28

View 2 revisions

conflicting signals here, see 0003462 and 0004017.

in any case both of you fine gents know C++, PR's welcome.

~0017518

abma (administrator)

@gajop:

i guess you are referencing to a modinfo.lua in a .sdd archive?

~0017526

gajop (developer)

@Kloot: Uhh, I completely forgot about that. I know I had issues but don't remember it being fixed. Maybe I misinterpreted it being fixed or it was system specific.

@abma: No, I don't think so. I'm talking about references (items in the modinfo.lua depend table) to other archives. They are of course modified in .sdd archives (I don't think anyone modifies .sdz/.sd7 archives, certainly not during development?).

~0017528

abma (administrator)

possible renaming modinfo.lua to modinfo2.lua and rename it back could be a workarround.


to fix this specific case the ArchiveScanner should check the time of modinfo.lua / mapinfo.lua, too. not sure if this has some drawbacks as well, checking all file timestamps IMHO is to slow.

~0017529

gajop (developer)

My current workaround is to delete the cache each time. It seems to be "fast enough" as fast archive scanning is enabled by default.

~0019508

gajop (developer)

Fix 987e6715ea6338182e418567d04fa58cc93a4d09 committed to cache_reload_fix branch: fix 0005537
ArchiveScanner will now properly detect when modinfo.lua/mapinfo.lua
 changes, and reparse the archive.
This fixes issues like changing the depends subtable and not seeing any
 change until the cache dir is deleted.

Implementation details:
- We now cache an additional path to the modinfo.lua/mapinfo.lua and
 the related modified timestamp. This applies to datadirs (.sdd)
 archives only
- This means that reading the cache will have two additional stat calls
 for datadirs. I have over 40 .sdd archives (on both HDD and SSD) and
 there is no noticeable performance hit. Players are likely to have very
 few of such archives, probably 0. So unlikely to hurt performance in
 general.
- Likewise, this information is only saved for datadirs as well, so
there shouldn't be any performance hit on writing the cache either.
- The way I obtain the full path of the archive is stolen from
`CVFSHandler::GetFileAbsolutePath`, and maybe could be rewritten with
DRY. Also probably should be tested on windows, the "/" seems suspicious

Minor:
- INTERNAL_VAR is incremented
- CheckCachedData signature is modified to pass modifiedTime by
reference as it cannot be nullptr
- internalver is loaded as lowercase (consistent to how its saved), repo: spring changeset id: 11121

~0019557

gajop (developer)

Fix ddf6a04ab93ec89d9cb1a38b303a4e75a5b7cd93 committed to cache_reload_fix branch: fix 0005537
ArchiveScanner will now properly detect when modinfo.lua/mapinfo.lua
 changes, and reparse the archive.
This fixes issues like changing the depends subtable and not seeing any
 change until the cache dir is deleted.

Implementation details:
- We now cache an additional path to the modinfo.lua/mapinfo.lua and
 the related modified timestamp. This applies to datadirs (.sdd)
 archives only
- This means that reading the cache will have two additional stat calls
 for datadirs. I have over 40 .sdd archives (on both HDD and SSD) and
 there is no noticeable performance hit. Players are likely to have very
 few of such archives, probably 0. So unlikely to hurt performance in
 general.
- Likewise, this information is only saved for datadirs as well, so
there shouldn't be any performance hit on writing the cache either.
- The way I obtain the full path of the archive is stolen from
`CVFSHandler::GetFileAbsolutePath`, and maybe could be rewritten with
DRY. Also probably should be tested on windows, the "/" seems suspicious

Minor:
- INTERNAL_VAR is incremented
- CheckCachedData signature is modified to pass modifiedTime by
reference as it cannot be nullptr
- internalver is loaded as lowercase (consistent to how its saved), repo: spring changeset id: 11146

~0019558

gajop (developer)

Fix 6e2a739d632f46d911ad6ea6c01ff839f7927a12 committed to develop branch: fix 0005537
ArchiveScanner will now properly detect when modinfo.lua/mapinfo.lua
 changes, and reparse the archive.
This fixes issues like changing the depends subtable and not seeing any
 change until the cache dir is deleted.

Implementation details:
- We now cache an additional path to the modinfo.lua/mapinfo.lua and
 the related modified timestamp. This applies to datadirs (.sdd)
 archives only
- This means that reading the cache will have two additional stat calls
 for datadirs. I have over 40 .sdd archives (on both HDD and SSD) and
 there is no noticeable performance hit. Players are likely to have very
 few of such archives, probably 0. So unlikely to hurt performance in
 general.
- Likewise, this information is only saved for datadirs as well, so
there shouldn't be any performance hit on writing the cache either.
- The way I obtain the full path of the archive is stolen from
`CVFSHandler::GetFileAbsolutePath`, and maybe could be rewritten with
DRY. Also probably should be tested on windows, the "/" seems suspicious

Minor:
- INTERNAL_VAR is incremented
- CheckCachedData signature is modified to pass modifiedTime by
reference as it cannot be nullptr
- internalver is loaded as lowercase (consistent to how its saved), repo: spring changeset id: 11147

~0019559

gajop (developer)

Fix 62297f4db1f102337be34eff97162c7f87919414 committed to maintenance branch: fix 0005537
ArchiveScanner will now properly detect when modinfo.lua/mapinfo.lua
 changes, and reparse the archive.
This fixes issues like changing the depends subtable and not seeing any
 change until the cache dir is deleted.

Implementation details:
- We now cache an additional path to the modinfo.lua/mapinfo.lua and
 the related modified timestamp. This applies to datadirs (.sdd)
 archives only
- This means that reading the cache will have two additional stat calls
 for datadirs. I have over 40 .sdd archives (on both HDD and SSD) and
 there is no noticeable performance hit. Players are likely to have very
 few of such archives, probably 0. So unlikely to hurt performance in
 general.
- Likewise, this information is only saved for datadirs as well, so
there shouldn't be any performance hit on writing the cache either.
- The way I obtain the full path of the archive is stolen from
`CVFSHandler::GetFileAbsolutePath`, and maybe could be rewritten with
DRY. Also probably should be tested on windows, the "/" seems suspicious

Minor:
- INTERNAL_VAR is incremented
- CheckCachedData signature is modified to pass modifiedTime by
reference as it cannot be nullptr
- internalver is loaded as lowercase (consistent to how its saved), repo: spring changeset id: 11148
+Notes

-Related Changesets
spring: cache_reload_fix 4eff6e2a
Timestamp: 2018-11-10 18:26:06
Author: gajop
Details ] Diff ]
fix 0005537
ArchiveScanner will now properly detect when modinfo.lua/mapinfo.lua
changes, and reparse the archive.
This fixes issues like changing the depends subtable and not seeing any
change until the cache dir is deleted.

Implementation details:
- We now cache an additional path to the modinfo.lua/mapinfo.lua and
the related modified timestamp. This applies to datadirs (.sdd)
archives only
- This means that reading the cache will have two additional stat calls
for datadirs. I have over 40 .sdd archives (on both HDD and SSD) and
there is no noticeable performance hit. Players are likely to have very
few of such archives, probably 0. So unlikely to hurt performance in
general.
- Likewise, this information is only saved for datadirs as well, so
there shouldn't be any performance hit on writing the cache either.
- The way I obtain the full path of the archive is stolen from
`CVFSHandler::GetFileAbsolutePath`, and maybe could be rewritten with
DRY. Also probably should be tested on windows, the "/" seems suspicious

Minor:
- INTERNAL_VAR is incremented
- CheckCachedData signature is modified to pass modifiedTime by
reference as it be nullptr
- internalver is loaded as lowercase (consistent to how its saved)
mod - rts/System/FileSystem/ArchiveScanner.cpp Diff ] File ]
mod - rts/System/FileSystem/ArchiveScanner.h Diff ] File ]
spring: cache_reload_fix 987e6715
Timestamp: 2018-11-10 18:26:06
Author: gajop
Details ] Diff ]
fix 0005537
ArchiveScanner will now properly detect when modinfo.lua/mapinfo.lua
changes, and reparse the archive.
This fixes issues like changing the depends subtable and not seeing any
change until the cache dir is deleted.

Implementation details:
- We now cache an additional path to the modinfo.lua/mapinfo.lua and
the related modified timestamp. This applies to datadirs (.sdd)
archives only
- This means that reading the cache will have two additional stat calls
for datadirs. I have over 40 .sdd archives (on both HDD and SSD) and
there is no noticeable performance hit. Players are likely to have very
few of such archives, probably 0. So unlikely to hurt performance in
general.
- Likewise, this information is only saved for datadirs as well, so
there shouldn't be any performance hit on writing the cache either.
- The way I obtain the full path of the archive is stolen from
`CVFSHandler::GetFileAbsolutePath`, and maybe could be rewritten with
DRY. Also probably should be tested on windows, the "/" seems suspicious

Minor:
- INTERNAL_VAR is incremented
- CheckCachedData signature is modified to pass modifiedTime by
reference as it cannot be nullptr
- internalver is loaded as lowercase (consistent to how its saved)
mod - rts/System/FileSystem/ArchiveScanner.cpp Diff ] File ]
mod - rts/System/FileSystem/ArchiveScanner.h Diff ] File ]
spring: cache_reload_fix ddf6a04a
Timestamp: 2018-11-10 18:26:06
Author: gajop
Details ] Diff ]
fix 0005537
ArchiveScanner will now properly detect when modinfo.lua/mapinfo.lua
changes, and reparse the archive.
This fixes issues like changing the depends subtable and not seeing any
change until the cache dir is deleted.

Implementation details:
- We now cache an additional path to the modinfo.lua/mapinfo.lua and
the related modified timestamp. This applies to datadirs (.sdd)
archives only
- This means that reading the cache will have two additional stat calls
for datadirs. I have over 40 .sdd archives (on both HDD and SSD) and
there is no noticeable performance hit. Players are likely to have very
few of such archives, probably 0. So unlikely to hurt performance in
general.
- Likewise, this information is only saved for datadirs as well, so
there shouldn't be any performance hit on writing the cache either.
- The way I obtain the full path of the archive is stolen from
`CVFSHandler::GetFileAbsolutePath`, and maybe could be rewritten with
DRY. Also probably should be tested on windows, the "/" seems suspicious

Minor:
- INTERNAL_VAR is incremented
- CheckCachedData signature is modified to pass modifiedTime by
reference as it cannot be nullptr
- internalver is loaded as lowercase (consistent to how its saved)
mod - rts/System/FileSystem/ArchiveScanner.cpp Diff ] File ]
mod - rts/System/FileSystem/ArchiveScanner.h Diff ] File ]
spring: develop 6e2a739d
Timestamp: 2018-11-10 18:26:06
Author: gajop
Details ] Diff ]
fix 0005537
ArchiveScanner will now properly detect when modinfo.lua/mapinfo.lua
changes, and reparse the archive.
This fixes issues like changing the depends subtable and not seeing any
change until the cache dir is deleted.

Implementation details:
- We now cache an additional path to the modinfo.lua/mapinfo.lua and
the related modified timestamp. This applies to datadirs (.sdd)
archives only
- This means that reading the cache will have two additional stat calls
for datadirs. I have over 40 .sdd archives (on both HDD and SSD) and
there is no noticeable performance hit. Players are likely to have very
few of such archives, probably 0. So unlikely to hurt performance in
general.
- Likewise, this information is only saved for datadirs as well, so
there shouldn't be any performance hit on writing the cache either.
- The way I obtain the full path of the archive is stolen from
`CVFSHandler::GetFileAbsolutePath`, and maybe could be rewritten with
DRY. Also probably should be tested on windows, the "/" seems suspicious

Minor:
- INTERNAL_VAR is incremented
- CheckCachedData signature is modified to pass modifiedTime by
reference as it cannot be nullptr
- internalver is loaded as lowercase (consistent to how its saved)
mod - rts/System/FileSystem/ArchiveScanner.cpp Diff ] File ]
mod - rts/System/FileSystem/ArchiveScanner.h Diff ] File ]
spring: maintenance 62297f4d
Timestamp: 2018-11-10 18:26:06
Author: gajop
Details ] Diff ]
fix 0005537
ArchiveScanner will now properly detect when modinfo.lua/mapinfo.lua
changes, and reparse the archive.
This fixes issues like changing the depends subtable and not seeing any
change until the cache dir is deleted.

Implementation details:
- We now cache an additional path to the modinfo.lua/mapinfo.lua and
the related modified timestamp. This applies to datadirs (.sdd)
archives only
- This means that reading the cache will have two additional stat calls
for datadirs. I have over 40 .sdd archives (on both HDD and SSD) and
there is no noticeable performance hit. Players are likely to have very
few of such archives, probably 0. So unlikely to hurt performance in
general.
- Likewise, this information is only saved for datadirs as well, so
there shouldn't be any performance hit on writing the cache either.
- The way I obtain the full path of the archive is stolen from
`CVFSHandler::GetFileAbsolutePath`, and maybe could be rewritten with
DRY. Also probably should be tested on windows, the "/" seems suspicious

Minor:
- INTERNAL_VAR is incremented
- CheckCachedData signature is modified to pass modifiedTime by
reference as it cannot be nullptr
- internalver is loaded as lowercase (consistent to how its saved)
mod - rts/System/FileSystem/ArchiveScanner.cpp Diff ] File ]
mod - rts/System/FileSystem/ArchiveScanner.h Diff ] File ]

+Related Changesets

-Issue History
Date Modified Username Field Change
2017-04-26 05:13 gajop New Issue
2017-04-26 10:14 silentwings Note Added: 0017513
2017-04-26 12:25 Kloot Relationship added has duplicate 0003462
2017-04-26 12:25 Kloot Relationship added duplicate of 0004017
2017-04-26 12:26 Kloot Note Added: 0017514
2017-04-26 12:28 Kloot Note Edited: 0017514 View Revisions
2017-04-26 13:31 abma Note Added: 0017518
2017-04-26 15:59 gajop Note Added: 0017526
2017-04-26 16:10 abma Note Added: 0017528
2017-04-26 16:11 gajop Note Added: 0017529
2018-11-10 18:38 gajop Changeset attached => spring cache_reload_fix 4eff6e2a
2018-11-10 18:38 gajop Assigned To => gajop
2018-11-10 18:38 gajop Status new => resolved
2018-11-10 18:38 gajop Resolution open => fixed
2018-11-10 18:39 gajop Changeset attached => spring cache_reload_fix 987e6715
2018-11-10 18:39 gajop Note Added: 0019508
2018-11-17 01:30 gajop Changeset attached => spring cache_reload_fix ddf6a04a
2018-11-17 01:30 gajop Note Added: 0019557
2018-11-17 02:07 gajop Changeset attached => spring develop 6e2a739d
2018-11-17 02:07 gajop Note Added: 0019558
2018-11-17 02:08 gajop Changeset attached => spring maintenance 62297f4d
2018-11-17 02:08 gajop Note Added: 0019559
+Issue History