fiskaltrust / middleware

The fiskaltrust.Middleware is an integrated set of highly configurable software components for POS systems to abstract the complexity of national fiscalization laws.
https://docs.fiskaltrust.eu
European Union Public License 1.2
9 stars 4 forks source link

Swissbit tse Chunked Export: safe last exported transaction number, add iteration value #218

Closed forsthug closed 10 months ago

forsthug commented 1 year ago

When using the chunked export we want to save the last exported transaction number and export a chunk from this last exported transaction number and then increase the last exported transaction number to the new value.

This will create a journal entry at each daily closing containing only the transactions in this range. This way we will continuously export all transactions without running into OOM exceptions.

Open questions

Can we delete the transaction ranges in the chunks from the TSE or can we only delete everything once we have exported everything.

volllly commented 1 year ago
StefanKert commented 11 months ago

So while the export seems to take pretty long via our Middleware, it turns out that the export itself is fast. Exporting a 500MB file from a Swissbit TSE takes around 45 seconds which is way longer than in our tests.

One thing worth mentioning is the fact that the zipped file is around 10% of the original size of the export.

One thing that is not very clear to me is the fact that the initial issue reported was about a OOM which can only be explained with TSEs that have larger files, or another memory leak that we have.