mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
Redis: Force storage sync mode when reading pcaps, default to async mode
This commit is contained in:
parent
31e146b16d
commit
52d94b781a
2 changed files with 4 additions and 2 deletions
|
@ -88,7 +88,9 @@ storage::BackendPtr Redis::Instantiate(std::string_view tag) { return make_intru
|
|||
* with a corresponding message.
|
||||
*/
|
||||
ErrorResult Redis::DoOpen(RecordValPtr options) {
|
||||
async_mode = options->GetField<BoolVal>("async_mode")->Get();
|
||||
// When reading traces we disable storage async mode globally (see src/storage/Backend.cc) since
|
||||
// time moves forward based on the pcap and not based on real time.
|
||||
async_mode = options->GetField<BoolVal>("async_mode")->Get() && ! zeek::run_state::reading_traces;
|
||||
key_prefix = options->GetField<StringVal>("key_prefix")->ToStdString();
|
||||
|
||||
redisOptions opt = {0};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue