adamdebreceni commented on a change in pull request #955: URL: https://github.com/apache/nifi-minifi-cpp/pull/955#discussion_r603216508
########## File path: libminifi/include/utils/StagingQueue.h ########## @@ -0,0 +1,168 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include <mutex> +#include <atomic> +#include <utility> +#include "MinifiConcurrentQueue.h" + +namespace org { +namespace apache { +namespace nifi { +namespace minifi { +namespace utils { + +namespace internal { +template<typename T> +struct default_allocator { + T operator()(size_t max_size) const { + return T::allocate(max_size); + } +}; +} // namespace internal + +template<typename ActiveItem, typename Allocator = internal::default_allocator<ActiveItem>> +class StagingQueue { Review comment: done ########## File path: libminifi/src/io/ZlibStream.cpp ########## @@ -127,7 +143,12 @@ ZlibDecompressStream::ZlibDecompressStream(gsl::not_null<OutputStream*> output, ZlibDecompressStream::~ZlibDecompressStream() { if (state_ != ZlibStreamState::UNINITIALIZED) { - inflateEnd(&strm_); + int result = inflateEnd(&strm_); + if (result == Z_STREAM_ERROR) { + logger_->log_debug("Stream state was inconsistent"); + } else if (result != Z_OK) { + logger_->log_debug("Unknown error while finishing decompression %d", result); Review comment: changed to `log_error` ########## File path: conf/minifi-log.properties ########## @@ -45,3 +45,11 @@ logger.org::apache::nifi::minifi=INFO,rolling #Logging configurable by class fully qualified name #logger.org::apache::nifi::minifi::core::logging::LoggerConfiguration=DEBUG + +# Log compression # +## Enables the agent to keep a limited chunk of the application +## logs in memory in compressed format. Note that due to its +## compressed nature this could mean more logs than the contents +## of the log files. +#compression.cached.log.max.size=8 MB +#compression.compressed.log.max.size=8 MB Review comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
