try to fix stress test error

This commit is contained in:
Vxider 2020-02-17 23:03:39 +08:00
parent 35600d6a99
commit 328150797d
2 changed files with 3 additions and 6 deletions

View File

@ -800,6 +800,7 @@ void StorageWindowView::writeIntoWindowView(StorageWindowView & window_view, con
stream->write(std::move(block_));
const ColumnUInt32::Container & wend_data
= static_cast<const ColumnUInt32 &>(*column_wend).getData();
std::unique_lock lock(window_view.fire_signal_mutex);
for (size_t i = 0; i < wend_data.size(); ++i)
{
if (wend_data[i] < timestamp_now)
@ -827,6 +828,7 @@ void StorageWindowView::writeIntoWindowView(StorageWindowView & window_view, con
new_mergeable_blocks->push_back(std::move(block_));
const ColumnUInt32::Container & wend_data
= static_cast<const ColumnUInt32 &>(*column_wend).getData();
std::unique_lock lock(window_view.fire_signal_mutex);
for (size_t i = 0; i < wend_data.size(); ++i)
{
if (wend_data[i] < timestamp_now)

View File

@ -43,7 +43,7 @@ public:
Block getHeader() const override { return storage->getHeader(); }
inline void addFireSignal(UInt32 timestamp)
void addFireSignal(UInt32 timestamp)
{
std::lock_guard lock(fire_signal_mutex);
fire_signal.push_back(timestamp);
@ -56,11 +56,6 @@ protected:
return tryReadImpl();
}
/** tryRead method attempts to read a block in either blocking
* or non-blocking mode. If blocking is set to false
* then method return empty block with flag set to false
* to indicate that method would block to get the next block.
*/
Block tryReadImpl()
{
Block res;