Open huli opened 4 years ago
I can reproduce this. When using store='memory://'
, the example works as expected.
However, upon using rocksdb
as store, I encounter the same behaviour as reported by @huli .
[2020-02-05 17:13:34,489] [23824] [WARNING] print_windowed_events before: []
[2020-02-05 17:13:34,489] [23824] [WARNING] <RawModel: date=1580919214, value=0.23741364623156347>
[2020-02-05 17:13:34,490] [23824] [WARNING] print_windowed_events after: []
[2020-02-05 17:13:34,594] [23824] [WARNING] print_windowed_events before: []
[2020-02-05 17:13:34,594] [23824] [WARNING] <RawModel: date=1580919214, value=0.7504472921876363>
[2020-02-05 17:13:34,595] [23824] [WARNING] print_windowed_events after: []
Confirmed I have experienced the same thing. I spent a few days debugging other areas of my application over this. The tests pass (using memory) but the app always returns the default value with a single aggregation applied. Does anyone have a workaround they use? It’s been several months and no official word about this bug.
Are you by any chance getting differing behaviours with Cython enabled/disabled? Cython can be disabled by setting the environment variable NO_CYTHON=True
.
I'm experiencing similar behaviour which seems to be related to how the Cython implementation of HoppingWindow returns timestamp. Could be the same bug.
Are the values stored in RocksDB? RocksDB can be installed by installing the ldb
tool and then run ldb scan --db=<path to .db directory>
, the path can be found when faust worker
starts.
@forsberg I'm seeing this as well. Setting NO_CYTHON=True
did fix the behavior!
@taybin - interesting. You may want to try running with the code from #675.
Checklist
master
branch of Faust.Steps to reproduce
As soon as I edit the provided window example (https://github.com/robinhood/faust/blob/master/examples/windowed_aggregation.py) to use rocksdb the behavior suddenly changes. The value-function does always return an empty list.
(The code is more or less the same as. I just shortened the example for brevity)
Expected behavior
I would expect the output like when using the in memory store:
[2020-01-10 14:52:49,442] [10873] [WARNING] print_windowed_events before: [] [2020-01-10 14:52:49,442] [10873] [WARNING]
[2020-01-10 14:52:49,443] [10873] [WARNING] print_windowed_events after: []
[2020-01-10 14:52:49,943] [10873] [WARNING] print_windowed_events before: []
[2020-01-10 14:52:49,943] [10873] [WARNING]
[2020-01-10 14:52:49,943] [10873] [WARNING] print_windowed_events after: [, ]
Actual behavior
The value method does always return an empty list even when I just added an element. Therefore the window_processor always gets only one event instead of all events in the window.
Let me know if I miss something. I also checked python-rocksdb separately and it seems to work.
Versions
Comment
Thanks a lot for any suggestions on this!