-
Notifications
You must be signed in to change notification settings - Fork 479
Open
Labels
Description
Persistence of IV filter should be corresponding to port, password and IV triples, and never be removed until glider was uninstalled.
We can refer to the implementation of AOF of Redis:
- Set up a writing buffer and write records into it.
- Flush and append buffer to the AOF file when buffer is full and at the end of a event loop.
- Force to sync file buffer (related with file system and operating system) after flushing in step 2 or every second, or just leave the decision to the operating system.
- Perform AOF rewriting occasionally to shrink the size of AOF file.
In our design, the record to write is right the IV value (and the corresponding triple mentioned above), and AOF rewriting is to write the values of bloom filters.
Anyway, if the implementation does not consider unexpected blackout, persistence can be designed simper, but it is not recommended.
Related issue #223