Skip to content
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 pending query #9086

Merged
merged 1 commit into from
May 14, 2024
Merged
Changes from all commits
Commits
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
fix pending query
shivaji-kharse committed May 14, 2024
commit 5f08f2839a5ecb4927aae14551aeff4266b3b3a2
5 changes: 3 additions & 2 deletions tok/hnsw/helper.go
Original file line number Diff line number Diff line change
@@ -433,9 +433,10 @@ func (ph *persistentHNSW[T]) createEntryAndStartNodes(
err := ph.getVecFromUid(entry, c, vec)
if err != nil || len(*vec) == 0 {
// The entry vector has been deleted. We have to create a new entry vector.
entry, err := ph.PickStartNode(ctx, c, vec)
entry, err := ph.calculateNewEntryVec(ctx, c, vec)
if err != nil {
return 0, []*index.KeyValue{}, err
// No other node exists, go with the new node that has come
return create_edges(inUuid)
}
return create_edges(entry)
}
4 changes: 3 additions & 1 deletion worker/draft.go
Original file line number Diff line number Diff line change
@@ -843,7 +843,9 @@ func (n *node) commitOrAbort(pkey uint64, delta *pb.OracleDelta) error {
if txn == nil {
return
}
txn.Update()
if commit != 0 {
txn.Update()
}
// We start with 20 ms, so that we end up waiting 5 mins by the end.
// If there is any transient issue, it should get fixed within that timeframe.
err := x.ExponentialRetry(int(x.Config.MaxRetries),
4 changes: 3 additions & 1 deletion worker/mutation.go
Original file line number Diff line number Diff line change
@@ -950,7 +950,9 @@ func (w *grpcWorker) proposeAndWait(ctx context.Context, txnCtx *api.TxnContext,

node := groups().Node
err := node.proposeAndWait(ctx, &pb.Proposal{Mutations: m})
fillTxnContext(txnCtx, m.StartTs)
if err == nil {
fillTxnContext(txnCtx, m.StartTs)
}
return err
}