Comments (5)
I think you can get an inconsistency even with two puts?
Thread 1: begin do/while loop
Thread 2: start increasing capacity
T1: add k,v to objects
T2: copy objects [including k, v] to newArray, promote newArray to active objects
T1: stamp is invalid, retry
T1: objects.getAndSet returns non-null, isInsert is false, so we do not increment size
I think we may have to switch to a pessimistic ReadWriteLock which makes me sad.
from jvector.
Possibly we could replace O(1) size() with a combination of
- O(1) isEmpty
- O(1) modificationCount
- O(N) size() (just count the non-null keys)
from jvector.
I'm not sure the two put path works, since t1 retains isInsert
to true across retries.
from jvector.
I also considered replacing O(1) size and didn't see a strong reason not to, other than the nagging feeling that we might be able to do something better.
from jvector.
It doesn't look like the difference in optimistic vs pessimistic on put is material, which makes sense b/c build does much more expensive things when adding a new node. So my PR takes that approach to keep things simple.
from jvector.
Related Issues (20)
- jvector allocates lot of java.util.stream.Streams$RangeIntSpliterator
- AI- learning how to code
- GraphIndexBuilder.load() is broken after 3.0.0-alpha.3 HOT 1
- Eliminate redundant per-query CosineDecoder calculations
- Consider removing caching of vectors in CachingGraphIndex
- Consider allowing reuse of vector object in View.getVector
- Consider removing non-offset Vector functions
- Move vector read methods into the RAR interface/implementations
- Refactor SearchResult to avoid NodeScore[] allocations HOT 2
- Remove getVector or provide default implementation based on getVectorInto
- Encapsulate difference between similarity/bulk similarity in the score function API
- Introduce FloatSequences
- Refactor GraphIndex.View to make ADCView interface unnecessary
- NativeVectorizationProvider causes regression in BQ recall HOT 1
- SiftSmall (Sample Code Example) throws FileNotFoundException
- Explore use of mapped memory segments for mmapped indexes
- Add AVX-512 test runners
- How can we get a unique id after vector recall HOT 6
- Thresholding, overquery, and compression HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jvector.