It is likely that we'll change the HashMap implementation in the future,
hence its best to hide away the HashMap to make sure we can easily
replace it.
The previous logic was heavily flawed; it only had to check if the path
was a dir and isn't the remote snapshot directory.
Similarly, the file name parsing should only kick in if the item is a
file
This commit adds changes so that the main process almost immediately
acquires a lock on the data file when runtime is dropped. This is just
an added precaution to try and ensure that no other process does
something silly with the data file.
The descriptor is cloned for this using `FileLock::try_clone`
8e46e62 added a block_on_process_exit function that kept on sending
`notify_one()`s in a loop until the services terminated. This was
pointless as the `Drop` impl would do it for us anyways.
(What was I thinking?)
So, in main(), we're spawning an async task that lets the DB run as long
as we don't pass a ctrl_c (or some bad panic occurs). Once the ctrl_c
is received, we start terminating all workers. `block_on` returns DB
which should be the only one holding an atomic reference to the shared
field. We assert this right after dropping `runtime`.
Finally, the ECONNRESET suppression match was fixed to remove an
unreachable branch by adding conditional compilation
This commit ensures that the workers exit before attempting a flush_db
operation. Only after block_on_process_exit finishes we return `db`.
Now we run a simple flush_db operation knowing that the lock has been
released.
To block on process termination, we introduce a new function
block_on_process_exit that does the same thing as CoreDB's Drop
implementation.
The upload-release-asset action only supports files and not entire dirs.
I had expected it to zip an item if it were a directory; but I was wrong
This commit zips everything before attempting to upload the artifacts
This commit attempts to fix testing on Windows. It does this by parsing
output from `netsh interface ipv4 show excludedportrange protocol=tcp`
to find the port ranges that were reserved by this specifc Windows host
and then adds these ports to the set of already used ports (`in_set`) to
avoid allocating them to a test function.
* Add support for new T1 platforms
This commit adds support for the following Tier-1 (T1) platforms:
- i686-unknown-linux-gnu
- i686-pc-windows-msvc
* Fix channel and add explicit target in cargo test
* Use `target add` to add $matrix.rust target
* Use actions-rs/toolchain to install rust
* Install musl-tools to test musl
* Simplify matrix
* Add 32-bit targets and refactor workflow
* Fix build matrix
* Explicitly specify target in cargo test
* Use rustup to install toolchain
* Install 32 bit tools on Linux
* Remove ports in [49000,50000] on Windows
Windows is the most ingenious OS in the world where filenames can
conflict with shell commands. That's right, con is an I/O device on
Windows and cannot be used for a filename! This is why we were having
checkout errors on Windows!
Vive la POSIX!