Release 1.13.0
Common
- Added a new
olp::client::EqualJitterBackdownStrategybackdown strategy. You can use it to define the waiting time between retries inolp::client::RetrySettings. - Changed the open behavior for the protected cache. Now, it tries to open the cache in the r/w mode if it has enough filesystem permissions, and the user did not explicitly instruct to open the cache in the r/o mode via
olp::cache::CacheSettings::openOptions. - Changed the
olp::cache::DefaultCache::Openmethod. Now, it returnsolp::cache::DefaultCache::StorageOpenResult::ProtectedCacheCorruptedif you try to open a broken database, specifically more than 4 L0 levelDB storage files, and you need to compact the database manually before you try to open it again. - Added a bool operator to the
olp::client::ApiResponseclass, which is a shortcut forolp::client::ApiResponse::IsSuccessful(). Use this operator to check whether your response was successful. - Removed the arbitrary 2-second delay on shutdown inside
NetworkAndroid.cpp, which implements the abstractolp::http::Networkinterface for the Android platform. - Modified the
olp::client::OlpClientrequest. Previously, if the authentication request failed for any reason, and the token provider returned an empty token string, data requests were still sent with an empty token that failed with a 401 status. Now, theolp::client::OlpClientrequest is not sent if the bearer token is empty. - Fixed the wrong reset of the
olp::http::NetworkWinHttprequest after an error. - Fixed the compilation of the
olp::utils::Dirclass when compiled with enabled Unicode Character Set on Windows. - Fixed the
olp::Dir::FileExist()method when compiled on Windows. Instead of checking theFILE_ATTRIBUTE_NORMALattribute, it now checks that the attributes are unequal toINVALID_FILE_ATTRIBUTESto assume a file is present on the filesystem.
olp-cpp-sdk-authentication
- Improved usage of local and server time. When the local time is off, and the backend returns a wrong timestamp error, the server time is parsed from the
Dateresponse header field. Additionally, the server time is incremented locally between retries by adding the time elapsed between a request and response. - Set the authentication component APIs to use server time if the
use_system_timeoption is set tofalse.
olp-cpp-sdk-dataservice-read
- Removed the request repetition that occurred when the same blob request returned an error while multiple threads were waiting for the blob. Now, the returned error is shared with all waiting threads.