Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
46eaef4
perf(vector): Improve hnsw by sharding vectors
harshil-goel Jun 12, 2025
7e3aa8e
added changes
harshil-goel Jun 24, 2025
d651ad9
added changes
harshil-goel Jun 25, 2025
bbaa7fb
added changes
harshil-goel Jun 25, 2025
c8951dc
added changes
harshil-goel Jun 25, 2025
a87231a
added changes
harshil-goel Jun 25, 2025
874638a
added changes
harshil-goel Jun 25, 2025
09f4093
added changes
harshil-goel Jun 25, 2025
7b14cac
added changes
harshil-goel Jun 26, 2025
1cf52d8
added changes
harshil-goel Jun 26, 2025
b66cfc6
added changes
harshil-goel Jun 26, 2025
8a2dad2
added changes
harshil-goel Jun 26, 2025
9c5d175
added changes
harshil-goel Jun 26, 2025
7b15cac
added changes
harshil-goel Jun 26, 2025
9afdb8c
added changes
harshil-goel Jun 26, 2025
b2700d8
added changes
harshil-goel Jun 26, 2025
347d86f
added changes
harshil-goel Jun 26, 2025
9c24bd1
added changes
harshil-goel Jun 26, 2025
91b443b
added changes
harshil-goel Jun 26, 2025
7793f6f
added vt
harshil-goel Jun 27, 2025
992f9e8
added changes
harshil-goel Jun 27, 2025
997d355
added changes
harshil-goel Jun 27, 2025
b7a9896
added changes
harshil-goel Jun 27, 2025
deda345
added changes
harshil-goel Jun 27, 2025
eff837c
added changes
harshil-goel Jun 27, 2025
eb2b87e
added changes
harshil-goel Jun 27, 2025
0539ce8
added changes
harshil-goel Jun 27, 2025
5d330e7
added changes
harshil-goel Jun 27, 2025
49608a5
added changes
harshil-goel Jun 27, 2025
793a249
added changes
harshil-goel Jun 27, 2025
eb6f679
added changes
harshil-goel Jun 27, 2025
73ec4d3
added changes
harshil-goel Jun 27, 2025
6e463c1
added changes
harshil-goel Jun 27, 2025
5ec29d4
added changes
harshil-goel Jun 27, 2025
6a07b13
added changes
harshil-goel Jun 27, 2025
c312eda
added changes
harshil-goel Jun 27, 2025
47ad085
added changes
harshil-goel Jun 27, 2025
706e1bb
added changes
harshil-goel Jun 27, 2025
e779d34
added changes
harshil-goel Jun 30, 2025
450b40d
added changes
harshil-goel Jun 30, 2025
9f0b41f
added changes
harshil-goel Jun 30, 2025
5660a29
added changes
harshil-goel Jun 30, 2025
dda6f14
added changes
harshil-goel Jun 30, 2025
6df6e9f
added changes
harshil-goel Jun 30, 2025
a6ee3b9
added changes
harshil-goel Jun 30, 2025
4d3bce9
added changes
harshil-goel Jun 30, 2025
a0daad0
added changes
harshil-goel Jun 30, 2025
21c9235
added changes
harshil-goel Jun 30, 2025
c05821c
added changes
harshil-goel Jun 30, 2025
d31ae7e
added changes
harshil-goel Jun 30, 2025
c238c08
added changes
harshil-goel Jun 30, 2025
511d74e
added changes
harshil-goel Jun 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
508 changes: 496 additions & 12 deletions posting/index.go

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions posting/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,14 @@ type ListOptions struct {
First int
}

func NewVectorPosting(uid uint64, vec *[]byte) *pb.Posting {
return &pb.Posting{
Value: *vec,
ValType: pb.Posting_BINARY,
Op: Set,
}
}

// NewPosting takes the given edge and returns its equivalent representation as a posting.
func NewPosting(t *pb.DirectedEdge) *pb.Posting {
var op uint32
Expand Down
4 changes: 4 additions & 0 deletions posting/mvcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ func (txn *Txn) CommitToDisk(writer *TxnWriter, commitTs uint64) error {
for ; idx < len(keys); idx++ {
key := keys[idx]
data := cache.deltas[key]
//pk, _ := x.Parse([]byte(key))
//fmt.Println(pk, data)
if len(data) == 0 {
continue
}
Expand Down Expand Up @@ -634,6 +636,7 @@ func ReadPostingList(key []byte, it *badger.Iterator) (*List, error) {
// lists ended up being rolled-up multiple times. This issue was caught by the
// uid-set Jepsen test.
pk, err := x.Parse(key)
//fmt.Println("READING ", pk)
if err != nil {
return nil, errors.Wrapf(err, "while reading posting list with key [%v]", key)
}
Expand Down Expand Up @@ -712,6 +715,7 @@ func ReadPostingList(key []byte, it *badger.Iterator) (*List, error) {
l.mutationMap = newMutableLayer()
}
l.mutationMap.insertCommittedPostings(pl)
//fmt.Println("HERE", pk, pl, l.mutationMap)
return nil
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion schema/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func parseTokenOrVectorIndexSpec(
tokenizer, has := tok.GetTokenizer(tokenOrFactoryName)
if !has {
return tokenOrFactoryName, nil, false,
next.Errorf("Invalid tokenizer %s", next.Val)
next.Errorf("Invalid tokenizer 1 %s", next.Val)
}
tokenizerType, ok := types.TypeForName(tokenizer.Type())
x.AssertTrue(ok) // Type is validated during tokenizer loading.
Expand Down
5 changes: 5 additions & 0 deletions schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,11 @@ func (s *state) PredicatesToDelete(pred string) []string {
preds = append(preds, pred+hnsw.VecEntry)
preds = append(preds, pred+hnsw.VecKeyword)
preds = append(preds, pred+hnsw.VecDead)
for i := range 1000 {
preds = append(preds, fmt.Sprintf("%s%s_%d", pred, hnsw.VecEntry, i))
preds = append(preds, fmt.Sprintf("%s%s_%d", pred, hnsw.VecKeyword, i))
preds = append(preds, fmt.Sprintf("%s%s_%d", pred, hnsw.VecDead, i))
}
}
}
return preds
Expand Down
Loading
Loading