-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Fix broken ETS references #22
Conversation
* Implement flush callback for Avrora.Storage.Memory
It will give an oportunity to clean up memory storage every time you run ex-unit
* Add Avrora.ETS to the supervision tree with "one for all" strategy close to Avrora.Storage.Memory * Add new config setting Avrora.Config.ets_lib which holds module with `new/0` function * Add Avrora.TestCase to clean Avrora.Storage.Memory state between tests
I have read some source code. Now I see that ETS is a backend for Only feedback is that, in a first read, it seems slightly odd to me to use the generic API for ETS instead of Also, that ETS table could have an informative name (can be passed to Only some feedback since I said I would read the source code :). Of course, the current code does the job and my comments are details based mostly on personal preferences, no need to change anything unless you like some of those ideas. Thanks for this library! |
@fxn Thanks for your effort, let me follow up:
Yes, I have that in mind, and first draft was doing exactly as you said, but
Again – you are right, I spend so much time to come up with a nice name and as you see I change it to
Ok, here we have a more complicated situation. Since the same schema can be represented with few P.S Just in case if you have in mind any name example for |
Can you elaborate on this? While reading the source code of |
@fxn Yep, they use schema store as one storage for all schemas you might have. But in our case, we can have a schema registry and the same schema can be represented with different versions. You can't have in one storage the same schema with different definitions. That's why one schema is a small universe with its own storage where it will be decomposed on sub-definitions and lookup functionality becomes available from UPD: Schema decomposition happened when you add type to the |
This PR include 3 major changes:
Avrora.Name
module was moved toAvrora.Schema.Name
Avrora.TestCase
helper module getscleanup_storage!/1
function to clean storage between testsAvrora.ETS
module now supervisioned together withAvrora.Storage.Memory
and owns all ETS tables generated byAvrora.Schema
Resolves: #21