1 Commits

Author SHA1 Message Date
8dd46b8ad8 v2.0.2-rc (#27)
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
## v2.0.2-rc

### BREAKING CHANGES

* Refactored `config.json` - will need to verify configuration settings prior to mounting

### Issues

* \#12 \[Unit Test\] Complete all providers unit tests
* \#14 \[Unit Test\] SQLite mini-ORM unit tests and cleanup
* \#16 Add support for bucket name in Sia provider
* \#17 Update to common c++ build system
  * A single 64-bit Linux Jenkins server is used to build all Linux and Windows versions
  * All dependency sources are now included
  * MSVC is no longer supported
  * MSYS2 is required for building Windows binaries on Windows
  * OS X support is temporarily disabled
* \#19 \[bug\] Rename file is broken for files that are existing
* \#23 \[bug\] Incorrect file size displayed while upload is pending
* \#24 RocksDB implementations should be transactional
* \#25 Writes should block when maximum cache size is reached
* \#26 Complete ring buffer and direct download support

### Changes from v2.0.1-rc

* Ability to choose between RocksDB and SQLite databases
* Added direct reads and implemented download fallback
* Corrected file times on S3 and Sia providers
* Corrected handling of `chown()` and `chmod()`
* Fixed erroneous download of chunks after resize

Reviewed-on: #27
2024-12-28 15:56:40 -06:00
3 changed files with 10 additions and 11 deletions

View File

@ -27,7 +27,6 @@
* Ability to choose between RocksDB and SQLite databases * Ability to choose between RocksDB and SQLite databases
* Added direct reads and implemented download fallback * Added direct reads and implemented download fallback
* Comprehensive WinFSP and FUSE unit tests, including remote testing
* Corrected file times on S3 and Sia providers * Corrected file times on S3 and Sia providers
* Corrected handling of `chown()` and `chmod()` * Corrected handling of `chown()` and `chmod()`
* Fixed erroneous download of chunks after resize * Fixed erroneous download of chunks after resize

View File

@ -39,7 +39,6 @@
#include "utils/file.hpp" #include "utils/file.hpp"
#include "utils/path.hpp" #include "utils/path.hpp"
#include "utils/polling.hpp" #include "utils/polling.hpp"
#include "utils/time.hpp"
namespace repertory { namespace repertory {
file_manager::file_manager(app_config &config, i_provider &provider) file_manager::file_manager(app_config &config, i_provider &provider)
@ -220,7 +219,7 @@ auto file_manager::get_open_file_by_handle(std::uint64_t handle) const
-> std::shared_ptr<i_closeable_open_file> { -> std::shared_ptr<i_closeable_open_file> {
auto file_iter = auto file_iter =
std::find_if(open_file_lookup_.begin(), open_file_lookup_.end(), std::find_if(open_file_lookup_.begin(), open_file_lookup_.end(),
[&handle](const auto &item) -> bool { [&handle](auto &&item) -> bool {
return item.second->has_handle(handle); return item.second->has_handle(handle);
}); });
return (file_iter == open_file_lookup_.end()) ? nullptr : file_iter->second; return (file_iter == open_file_lookup_.end()) ? nullptr : file_iter->second;
@ -381,11 +380,10 @@ auto file_manager::open(const std::string &api_path, bool directory,
return open(api_path, directory, ofd, handle, file, nullptr); return open(api_path, directory, ofd, handle, file, nullptr);
} }
auto file_manager::open(const std::string &api_path, bool directory, auto file_manager::open(
const open_file_data &ofd, std::uint64_t &handle, const std::string &api_path, bool directory, const open_file_data &ofd,
std::shared_ptr<i_open_file> &file, std::uint64_t &handle, std::shared_ptr<i_open_file> &file,
std::shared_ptr<i_closeable_open_file> closeable_file) std::shared_ptr<i_closeable_open_file> closeable_file) -> api_error {
-> api_error {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto create_and_add_handle = const auto create_and_add_handle =
@ -437,7 +435,7 @@ auto file_manager::open(const std::string &api_path, bool directory,
auto ring_size{ring_buffer_file_size / chunk_size}; auto ring_size{ring_buffer_file_size / chunk_size};
const auto get_download_type = [&](download_type type) -> download_type { const auto get_download_type = [&](download_type type) -> download_type {
if (directory || fsi.size == 0U) { if (directory || fsi.size == 0U || is_processing(api_path)) {
return download_type::default_; return download_type::default_;
} }
@ -749,8 +747,8 @@ auto file_manager::rename_directory(const std::string &from_api_path,
} }
auto file_manager::rename_file(const std::string &from_api_path, auto file_manager::rename_file(const std::string &from_api_path,
const std::string &to_api_path, bool overwrite) const std::string &to_api_path,
-> api_error { bool overwrite) -> api_error {
if (not provider_.is_rename_supported()) { if (not provider_.is_rename_supported()) {
return api_error::not_implemented; return api_error::not_implemented;
} }

View File

@ -52,6 +52,8 @@ auto from_api_error(const api_error &err) -> int {
return -EEXIST; return -EEXIST;
case api_error::file_in_use: case api_error::file_in_use:
return -EBUSY; return -EBUSY;
case api_error::invalid_handle:
return -EBADF;
case api_error::invalid_operation: case api_error::invalid_operation:
return -EINVAL; return -EINVAL;
case api_error::item_not_found: case api_error::item_not_found: