Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | FileStorage: fix writing settings on empty file | Vika | 2022-05-01 | 1 | -8/+12 |
| | |||||
* | FileStorage: lockless reads and atomic writes | Vika | 2022-05-01 | 2 | -221/+161 |
| | | | | | | | | | | | | | | | | | | | - Reads don't lock anymore. At all. - Writes create a temporary file and use `rename(2)` to atomically replace it - since OpenOptions::create_new(true) is used, tempfile creation is atomic (and since tempfile names are per-post, a post can only be edited by one request at a time) - Since written files get atomically replaced, readers can't read a corrupted file Potential pitfalls: 1. This approach is not covered by unit tests (yet) 2. Stale tempfiles can prevent editing posts (can be solved by throwing out tempfiles that are older than, say, a day) 3. Crashed edits can leave stale tempfiles (honestly that sounds better than corrupting the whole database, doesn't sound like a bug to me at all!) | ||||
* | Make the settings in the database a strong type | Vika | 2022-03-23 | 3 | -10/+28 |
| | |||||
* | FileStorage: add lints to catch panicking inside locked code sections | Vika | 2022-03-07 | 1 | -149/+168 |
| | |||||
* | Restored most of the functionality (except onboarding and some queries) | Vika | 2022-03-06 | 2 | -13/+20 |
| | |||||
* | database: code cleanup | Vika | 2022-03-02 | 2 | -26/+58 |
| | |||||
* | database/memory: restore, it is useful in test scenarios | Vika | 2022-02-21 | 2 | -0/+198 |
| | |||||
* | database: code cleanup | Vika | 2022-02-21 | 2 | -48/+29 |
| | |||||
* | database/file: use Authority instead of origin for directories | Vika | 2022-02-21 | 1 | -4/+4 |
| | |||||
* | WIP: convert to Tokio and Warp | Vika | 2022-02-15 | 2 | -58/+31 |
| | | | | | | | | | | | Warp allows requests to be applied as "filters", allowing to flexibly split up logic and have it work in a functional style, similar to pipes. Tokio is just an alternative runtime. I thought that maybe switching runtimes and refactoring the code might allow me to fish out that pesky bug with the whole application hanging after a certain amount of requests... | ||||
* | FileBackend: introduce timeouts on operations | Vika | 2021-12-31 | 1 | -34/+51 |
| | | | | | | This is to prevent spinning in a loop waiting for a lock. This hangs often, though I suspect this should have been fixed in the previous commit. | ||||
* | FileBackend: don't transfer locks over async boundaries | Vika | 2021-12-31 | 1 | -169/+188 |
| | | | | | | | This may or may not be the cause for the app hanging while waiting for a lock. Now the operations with locks are never performed over an async boundary, excluding any shenanigans that can happen when accidentally leaving a file locked over async boundaries. | ||||
* | Add protected locations that are visible only to logged-in users | Vika | 2021-12-07 | 1 | -1/+3 |
| | |||||
* | Make rustfmt and clippy happy | Vika | 2021-12-06 | 1 | -11/+13 |
| | |||||
* | Added support for IndieAuth client sign in | Vika | 2021-12-06 | 1 | -1/+1 |
| | | | | | | | This will allow readers to view private posts intended just for them. Additionally fixed bugs in patterns due to which webmentions might not have been sent. | ||||
* | Code cleanup and small bugfixing in templates | Vika | 2021-12-05 | 2 | -70/+139 |
| | |||||
* | Added author mini-cards on h-entries | Vika | 2021-12-05 | 1 | -37/+69 |
| | |||||
* | frontend: Added listing feeds to the header bar | Vika | 2021-12-05 | 2 | -10/+6 |
| | |||||
* | Get rid of the unsafe code | Vika | 2021-12-02 | 1 | -7/+4 |
| | | | | | | Thanks to @Kloenk I was able to get rid of the unsafety and tell the compiler how to properly check what I needed for the StorageError to be declared thread-safe. | ||||
* | Deprecated Redis backend and added a database migration tool (untested, beware) | Vika | 2021-10-27 | 3 | -20/+50 |
| | |||||
* | Modified the module to use BACKEND_URI | Vika | 2021-09-28 | 1 | -0/+2 |
| | |||||
* | Code cleanup and Cargo.lock updates | Vika | 2021-09-27 | 2 | -4/+6 |
| | |||||
* | Fix a bug in the error middleware | Vika | 2021-09-27 | 1 | -0/+1 |
| | | | | | | When an error is found, the site name passed to Storage::get_setting in the error handler is incorrect. The ASCII serialisation of the hostname should get used. | ||||
* | Implemented support for channels | Vika | 2021-09-27 | 3 | -65/+172 |
| | |||||
* | Implemented FileStorage::delete_post | Vika | 2021-09-27 | 1 | -1/+4 |
| | |||||
* | Finally figured out how to read without a BufReader | Vika | 2021-09-27 | 1 | -14/+6 |
| | | | | | BufReader was really unneccesary here, since I was batch-reading all of this in one go. | ||||
* | Improved symlink creation | Vika | 2021-09-27 | 1 | -5/+78 |
| | | | | | | Now symlink creation works on Windows and creates links relative to the posts, allowing for seamless migrations of the backing directory for true portability and no data lock-in. | ||||
* | Implemented FileStorage::get_setting and FileStorage::set_setting | Vika | 2021-09-27 | 1 | -2/+53 |
| | |||||
* | Moved integration tests and allowed the binary to use file backend | Vika | 2021-09-26 | 1 | -0/+6 |
| | | | | | | Now the Redis dependencies are optional and only required if you want to test the backend or actually use it in production. The app displays a hint if you try to launch with an unsupported backend. | ||||
* | Added file updates and fixed a bug with truncated JSON files | Vika | 2021-09-26 | 2 | -3/+154 |
| | | | | | | | | | | | There was a bug where `File::write()` would not write the entire buffer, and this condition was left unchecked by the code. All `File::write()` calls are now replaced with `File::write_all()` which ensures the whole buffer is written to the backing file. Additionally added a smoke check for the file updates. It is in no way comprehensive nor it is able to catch all the possible failures but it's a good way of testing the functionality without way too much hassle. | ||||
* | Added a WIP file backend | Vika | 2021-08-15 | 2 | -30/+210 |
| | | | | | | | Currently unavailable for use and only has basic GET and POST operations implemented. A lot more work is needed to make it truly usable. Locking is implemented using flock() system call on Linux. | ||||
* | Improved Redis module code quality | Vika | 2021-08-15 | 1 | -13/+10 |
| | |||||
* | Shortened a connection timeout and installed a lifetime limit for connection | Vika | 2021-08-06 | 1 | -1/+4 |
| | |||||
* | Trying to mitigate and log more about the HTTP 500s | Vika | 2021-08-05 | 1 | -10/+12 |
| | |||||
* | Fixed a VERY WRONG way to handle stream errors | Vika | 2021-08-04 | 2 | -31/+25 |
| | | | | | | for future reference: stream operations returning Result satisfy conditions for the futures::stream::TryStreamExt trait, allowing you to use `TryStreamExt::try_collect::<T>()` and receive a Result<T>. | ||||
* | Appease rustfmt, clippy and cargo check | Vika | 2021-07-29 | 1 | -2/+8 |
| | |||||
* | Relaxed anti-takeover URL check to simply not place redirects at foreign URLs | Vika Shleina | 2021-07-19 | 2 | -5/+5 |
| | |||||
* | Make rustfmt happy again after Clippy edits | Vika | 2021-05-18 | 1 | -4/+1 |
| | |||||
* | Make clippy happy | Vika | 2021-05-17 | 1 | -12/+8 |
| | |||||
* | Make rustfmt happy | Vika | 2021-05-17 | 2 | -127/+316 |
| | |||||
* | Added setting store per-user | Vika | 2021-05-17 | 2 | -0/+28 |
| | |||||
* | Update CI configuration and GitLab WebIDE settings | Vika | 2021-05-17 | 1 | -1/+1 |
| | |||||
* | Added a note to future self | Vika | 2021-05-05 | 1 | -0/+7 |
| | |||||
* | Refactored the Redis instance spawning in tests to automatically kill Redis | Vika | 2021-05-05 | 2 | -13/+28 |
| | |||||
* | Removed the in-memory database, it's dragging me down | Vika | 2021-05-05 | 2 | -203/+0 |
| | |||||
* | Moved the Redis spawner to the Redis module where it belongs, refactored ↵ | Vika | 2021-05-05 | 2 | -42/+49 |
| | | | | tests to use the Redis database instead of a fake one | ||||
* | Added a connection pool to the RedisDatabase | Vika | 2021-05-05 | 1 | -17/+27 |
| | |||||
* | Refactored error handling in RedisStorage using the ? operator | Vika | 2021-05-05 | 1 | -184/+124 |
| | |||||
* | Made some StorageError fields private and added getters instead | Vika | 2021-05-05 | 1 | -2/+5 |
| | |||||
* | Clippy lints | Vika | 2021-05-04 | 2 | -22/+16 |
| |