mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +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
|
@ -32,6 +32,6 @@ export {
|
||||||
# and the backend will be forced into synchronous mode, since
|
# and the backend will be forced into synchronous mode, since
|
||||||
# time won't move forward the same as when capturing live
|
# time won't move forward the same as when capturing live
|
||||||
# traffic.
|
# traffic.
|
||||||
async_mode: bool &default=F;
|
async_mode: bool &default=T;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,9 @@ storage::BackendPtr Redis::Instantiate(std::string_view tag) { return make_intru
|
||||||
* with a corresponding message.
|
* with a corresponding message.
|
||||||
*/
|
*/
|
||||||
ErrorResult Redis::DoOpen(RecordValPtr options) {
|
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();
|
key_prefix = options->GetField<StringVal>("key_prefix")->ToStdString();
|
||||||
|
|
||||||
redisOptions opt = {0};
|
redisOptions opt = {0};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue