-
Notifications
You must be signed in to change notification settings - Fork 297
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
missing Atom feed cache invalidating after adding link #347
Comments
The test script is too fast emitting requests. Per #238 the 2 default links are created:
The POST request is very likely to entail the creation of a new link with the same timestamp as the default public link, thus overwrites it when saving. I've forked the API tester and added |
Relates to #137 - batch "add multiple links" feature |
Fixes shaarli#200 Let me know if you want to change anything in the description.
There is no such thing as a too fast when it comes to computers. |
@virtualtam awesome finding by the way. |
closing as the PR #348 has all there is to know. |
Sadly, there is quite often when dealing with external (web) services - one must cope with their limitations (processing time, responsivity, server load) to simulate interactions accordingly. The issue here is a Shaarli limitation due to not storing links with a fine-enough-grained timestamp. Changing this is possible but not likely, as it would certainly wreak havoc on users' datastores. |
If ever a non backwards-compatible version of Shaarli is worked on, should timestamps be precise down to the millisecond? Right now two links saved at the same second will result in colliding shortlinks. This affects links created in an automated way (tests), and will likely affect batch-created links (#137) unless there's a built-in workaround. Manually creating links will likely never be an issue unless you're a very fast clicker. Related #348 (comment) |
@nodiscc would such a change really imply breaking backward-compatibility? |
The link datastore is represented as an associative array, where a link is accessed by using its timestamp as a key. Changing this would mean:
Until having a clean enough codebase, there is a very high risk we (developers) may miss use cases in doing so, thus break everyone's Shaarli instance. |
I understand it would be a large change. And risky with scarce test coverage, but |
The 0.5.* versions until current
master
seem to have a cache invalidation bug after adding a new link.See https://github.com/mro/Shaarli-API-test/issues/1#issuecomment-138123795
See all failing builds under so called 'allowed failures* in https://travis-ci.org/mro/Shaarli-API-test/builds/79034284
The text was updated successfully, but these errors were encountered: