Changes since v2.5:
-
storages::secdist::Secdist is now automatically reloaded for Mongo, Redis and PostgreSQL databases if the secdist file was changed. Now changing the connection parameters in file does not require service restart.
-
Public parts of the Redis driver were moved out from impl/ directory and placed into storages::redis:: namespace. If you were relying on the old paths, see
./scripts/migrate_from_legacy_redis_ns.sh
script to ease migration. -
Shortened testsuite logs were made more functional by providing HTTP URL info.
-
Removed old gRPC interface for server handlers as was promised in previous release notes.
-
gRPC client interfaces were changed to be more user friendly. For example, for
HelloWorld
method in protobuf we generate the oldHelloWorld
function along with the newAsyncHelloWorld
andSyncHelloWorld
functions.AsyncHelloWorld
returns a ugrpc::client::ResponseFuture that can be used to retrieve the request result later in code.SyncHelloWorld
retrieves the response from the future and returns the response itself. Consider replacing:HelloWorld(x).Finish()
withSyncHelloWorld(x)
auto res = HelloWorld(x); /* a lot of code */; res.Finish();
withauto res = AsyncHelloWorld(x); /* a lot of code*/; res.Get();
In next release we will remove the oldHelloWorld
and will renameSyncHelloWorld
intoHelloWorld
.
-
Added Easy - library for single file prototyping. Now the service can be created in a few code lines:
int main(int argc, char* argv[]) {
easy::HttpWith<>(argc, argv)
.DefaultContentType(http::content_type::kTextPlain)
.Route("/hello", [](const server::http::HttpRequest& /*req*/) {
return "Hello world"; // Just return the string as a response body
});
}
-
Added
userver_embed_file
CMake function to embed files into the binary. See Writing your first HTTP server for an example. -
Queries now can be moved to a separate files.
-
Added graceful shutdown functionality. See
graceful_shutdown_interval
in components::ManagerControllerComponent. -
server::http::HttpRequestBuilder now can be used to create server::http::HttpRequest in unit tests.
-
Kafka driver now has kafka::ConsumerScope::GetPartitionIds() and kafka::ConsumerScope::GetOffsetRange() functions. Many thanks to Kirill for the PR!
-
OpenTelemetry now sends
span_kind
information. -
Added user, password, and secure_connection_cert parameters support for the YDB secdist. Thanks to Попов Алексей for the PR!
-
POSTGRES_TOPOLOGY_SETTINGS now has disabled_replicas option to disable some of the replicas.
-
Fixed Kafka logs being written into
STDERR
in edge cases. Thanks to Dudnik Pavel for the PR! -
Added unbounded queue variants concurrent::UnboundedNonFifoMpscQueue, concurrent::UnboundedSpmcQueue, and concurrent::UnboundedSpscQueue. Those queues are usually x2 faster than the bounded variants.
-
GT
andLT
flags support in RedisZADD
. Thanks to Nikolay Pervushin for the PR!
Reduced condition in OTLP, thanks to Dudnik Pavel. -
Build:
- Simplified Profile Guided Optimization (PGO) gathering and usage due to new
USERVER_PGO_GENERATE
andUSERVER_PGO_USE
CMake options. See Configure, Build and Install for more info. - MacOS now can build the userver as a Conan package.
- Build flags were reorganized to use a new
USERVER_BUILD_ALL_LIBRARIES
CMake option. See Build options for more info. - Source directory now can contain spaces.
- Correctly set grpc-reflection found flag. Thanks to Nikita for the PR!
- Fixed
USERVER_CHAOTIC_FORMAT
option for CMake build. Thanks to Konstantin Goncharik for the PR. - Optimized reconfiguration in CMake giving up to 60% time save (6-20 seconds).
- Simplified Profile Guided Optimization (PGO) gathering and usage due to new
-
Documentation and diagnostics:
- More information on Mongo heartbeat in logs.
- Added docs about tag name of tracing::ScopeTime.
- Improved PostgreSQL diagnostic messages for server response parsing errors due to C++ and DB types mismatch.
- Better samples and docs for utils::statistics::Writer.
- Added direct database access to testsuite samples.
- Updated the Concurrent Queues docs.
- Log formats message was amended. Thanks to tkhanipov for the PR!