Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files not written with larger --file-block-count #6

Open
YaroShkvorets opened this issue Aug 31, 2023 · 1 comment
Open

Files not written with larger --file-block-count #6

YaroShkvorets opened this issue Aug 31, 2023 · 1 comment

Comments

@YaroShkvorets
Copy link

YaroShkvorets commented Aug 31, 2023

Sink process completes successfully but in some cases no files are written at all, in other cases, partially written .tmp are left, i.e.

$ l ./localdata/out
total 12096
drwxr-xr-x  3 shkvo  staff    96B 31 Aug 09:30 .
drwxr-xr-x  4 shkvo  staff   128B 31 Aug 09:28 ..
-rw-r--r--  1 shkvo  staff   5.9M 31 Aug 09:30 0010000000-0010050000.jsonl.ONvfywFG.tmp

Works fine with default 10000 file block count.

Might have something to do with flushing buffered bundle (?)

Reproduce with 50_000 file block count:

substreams-sink-files run \
    mainnet.eth.streamingfast.io:443 \
    https://github.com/streamingfast/substreams-eth-token-transfers/releases/download/v0.4.0/substreams-eth-token-transfers-v0.4.0.spkg \
    jsonl_out \
    ./localdata/out \
    -c=50_000 \
    --encoder=lines \
    --file-working-dir="./localdata/working" \
    --state-store=./localdata/working/state.yaml \
    10_000_000:+50_000
@YaroShkvorets
Copy link
Author

YaroShkvorets commented Aug 31, 2023

Basically the sink doesn't flush the last active file.

Looks like the app shuts down before running all functions registered in OnTerminating() that are supposed to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant