eigengo / scalad

Scala Data access for NoSQL databases
47 stars 15 forks source link

IndexedCollectionProvider once per collection per JVM #54

Closed fommil closed 11 years ago

fommil commented 11 years ago

Currently, every time a provider is instantiated with IndexedCollectionProvider, it will invoke a series of DB connections to check that indexes are present.

This is inappropriate behaviour when providers are created on demand (e.g. in actors) as it means needless DB lookups.

This RFE is to store a global status that ensures only one doIndex is performed per collection per JVM, bearing in mind that there may be a lot of contests at the startup of an application as many CRUDs are instantiated.