* 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!
We have introduced a trait `BufferedSocketStream` that is a 'dummy'
trait and is implemented for both `SslStream<TcpStream>` and
`TcpStream`. So, the generic `Connection` object accepts any type that
implements the `BufferedSocketStream` trait (and hence should also
implement `AsyncWrite`)
This commit does a LOT! It migrates the `queryengine::execute_simple`,
`CoreDB::execute_query` and the kvengine functions to use generic
connections.
The object dbnet::Con was removed because it isn't needed anymore.
The listeners were also upgraded to use the generic connection handler
The trait `Con` and `ConOps` were renamed to `ProtocolConnectionExt`
and `ProtocolConnection`.
This naming scheme clearly explains that the Ext version 'augments' the
non-Ext impl. This is the very case here: ProtocolConnection provides
the basic funtions needed for interfacing with net I/O while the Ext
trait enables high-level interaction with the protocol and ultimately
queries.
A generic `ConnectionHandler` object was added that will replace the
SSL and non-SSL handler objects, again reducing redundancy.
Dummy execute functions were added to CoreDB and queryengine.
This commit defines two traits: `Con` and `ConOps`. Implementors of
`ConOps` get a free implementation for `Con`. `Con` is the ultimate
object that can be used in place of the current SSL/non-SSL connection
objects. If you look at the implementations of the current connection
objects, they have a lot of repetition as they do almost the same thing
except for the fact that they have a different underlying stream.
This is exactly what we're trying to eliminate. We will also define a
generic connection handler object to reduce redundancy.
This commit removes the port ranges blocked/reserved by Windows on
Hyper-V VMs from the random port allocation range; see the comment for
more information.
Several changes were made to accomodate for this, including the addition
of the write_to_disk function that should be used by fns which don't
have a FileLock to pass for flushing data to the disk.
BGSAVE now takes ownership of a FileLock object which it uses for
running BGSAVE.
It seems that on Windows unlocking errors if the file has already been
unlocked. To fix this, we've added a platform-specific field to see if
the FileLock object has already been used to unlock the file.
This is the unlock field. In the Drop impl for Windows, we check the
unlocked flag to determine if we need to unlock the file.
This commit implements file locks for unix-based systems and windows
systems. This is done by using platform-specific `__sys` modules for
locking, trying to lock and unlocking files.
A build script was added for unix-systems that make use of the
flock-posix.c file
This commit removes the fscposix.c file and begins implementing native
file locking mechanisms for each platform (supported platforms)
BSD-style `flock`s were added
This commit adds a basic implementation of POSIX advisory record locking
which sets a lock on the `data.bin` file when the database server starts
and releases the lock when it terminates. This is just done for
compliance to let other processes know that we don't want them to use
the file.
However, the result depends entirely on the process that wants to do
'something' with the file. It is the responsibility of the process to
ensure that it respects the file lock.
Also, exclusive locks aren't perfect on Linux, so we can't rely on them.
See discussion #123 for more information.
Instead of unwrapping furiously right away, this commit makes sky-bench
first run a ping test (HEYA) to check if everything is all right.
If that is the case indeed, then we continue to run the benches, else
we terminate the program.
This has been discussed in #119