Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a1904d6
remove passing disablereassign in Split and Merge jobs
zhol01825 Apr 7, 2026
be09800
add delete posting if addhead fail
zhol01825 Apr 14, 2026
291f3f0
fix split bug
Apr 15, 2026
5cedf60
fix split gc
Apr 15, 2026
983b10e
fix separate DB per layer and remove aggressive split
Apr 16, 2026
ce480d5
remove Error due to another lock is locked
Apr 16, 2026
9a3bf79
all the layers share the same workspace id pool
Apr 16, 2026
8f0e075
fix iocp overlap in each layer issue
Apr 17, 2026
5e47d5e
fix split center order
Apr 22, 2026
c83d2d5
fix headvector version
Apr 24, 2026
0d5d43e
remove ChecksumCheck
Apr 24, 2026
339dabf
fix compiling issues
Apr 24, 2026
cb79f93
Merge remote-tracking branch 'origin/merge_spfresh' into users/cheqi/…
Apr 28, 2026
563a314
align two code bases
Apr 30, 2026
d461907
add version check
May 6, 2026
2d35428
Merge branch 'users/qiazh/pre-merge-tikv-bugfix' into users/cheqi/pre…
MaggieQi May 6, 2026
04274ae
add lock.unlock and clean SPFreshTest
May 8, 2026
62fc744
Merge branch 'users/cheqi/pre-merge-tikv-parallelbuild' of https://gi…
May 8, 2026
ca25288
fix deadlock issue
May 8, 2026
5869ea5
make append to be async job in split
May 9, 2026
b1e49d0
do splitAsync in Tikv
May 12, 2026
9f7b34a
fix log
May 14, 2026
fe1dee1
Merge branch 'users/qiazh/pre-merge-tikv-bugfix' of https://github.co…
May 15, 2026
d2ba6f2
Fix TiKV batch append lock ordering
zqxjjj May 18, 2026
214457d
Guard TiKV multi-chunk count fetch failures
zqxjjj May 18, 2026
e971283
Fail multi-chunk base writes on count update errors
zqxjjj May 18, 2026
04428e5
Potential fix for pull request finding
zqxjjj May 18, 2026
ff91135
Potential fix for pull request finding
zqxjjj May 18, 2026
36f1052
add distributed clustering and build
May 18, 2026
1378c31
Merge branch 'users/cheqi/pre-merge-tikv-parallelbuild' of https://gi…
May 18, 2026
7db01de
Fix TiKV Key_NotFound handling in append path
zqxjjj May 19, 2026
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
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -464,5 +464,4 @@ FodyWeavers.xsd
*.sln.iml

# SPTAG benchmark generated artifacts
/perftest_*
/evaluation/2026-04-23/output_distributed_hostname_*.json
*perftest_*
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
},
{
"name": "LD_PRELOAD",
"value": "/usr/lib/gcc/x86_64-linux-gnu/11/libasan.so"
"value": "/usr/lib/gcc/x86_64-linux-gnu/13/libasan.so"
},
{
"name": "PCI_ALLOWED",
Expand Down Expand Up @@ -170,7 +170,7 @@
},
{
"name": "LD_PRELOAD",
"value": "/usr/lib/gcc/x86_64-linux-gnu/11/libasan.so"
"value": "/usr/lib/gcc/x86_64-linux-gnu/13/libasan.so"
},
{
"name": "PCI_ALLOWED",
Expand Down
1,386 changes: 346 additions & 1,040 deletions AnnService/inc/Core/SPANN/ExtraDynamicSearcher.h

Large diffs are not rendered by default.

397 changes: 333 additions & 64 deletions AnnService/inc/Core/SPANN/ExtraTiKVController.h

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions AnnService/inc/Core/SPANN/Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ namespace SPTAG {
std::string m_truthPath;
TruthFileType m_truthType;
bool m_generateTruth;
std::string m_globalIDPath;
std::string m_indexDirectory;
std::string m_headIDFile;
std::string m_headVectorFile;
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Core/SPANN/ParameterDefinitionList.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ DefineBasicParameter(m_warmupDelimiter, std::string, std::string("|"), "WarmupDe
DefineBasicParameter(m_truthPath, std::string, std::string(""), "TruthPath")
DefineBasicParameter(m_truthType, SPTAG::TruthFileType, SPTAG::TruthFileType::Undefined, "TruthType")
DefineBasicParameter(m_generateTruth, bool, false, "GenerateTruth") // Mutable
DefineBasicParameter(m_globalIDPath, std::string, std::string(""), "GlobalIDPath")
DefineBasicParameter(m_indexDirectory, std::string, std::string("SPANN"), "IndexDirectory")
DefineBasicParameter(m_headIDFile, std::string, std::string("SPTAGHeadVectorIDs.bin"), "HeadVectorIDs")
DefineBasicParameter(m_deleteIDFile, std::string, std::string("DeletedIDs.bin"), "DeletedIDs")
Expand Down
31 changes: 17 additions & 14 deletions AnnService/inc/Helper/KeyValueIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,25 @@ namespace SPTAG

virtual ErrorCode Put(const SizeType key, const std::string& value, const std::chrono::microseconds& timeout, std::vector<Helper::AsyncReadRequest>* reqs) = 0;

// Batched writes/deletes. Default implementations return Undefined so that
// backends without native batching (RocksDB, FileIO) can ignore them.
// TiKVIO overrides these to issue a single batched RPC per region group,
// which dramatically reduces the number of synchronous gRPC round-trips
// when callers (e.g. SPANN AddIndex Phase 2 / PutPostingToDB) want to
// commit several keys at once.
virtual ErrorCode MultiPut(const std::vector<std::string>& keys,
const std::vector<std::string>& values,
const std::chrono::microseconds& timeout,
std::vector<Helper::AsyncReadRequest>* reqs) { return ErrorCode::Undefined; }

virtual ErrorCode MultiDelete(const std::vector<std::string>& keys,
const std::chrono::microseconds& timeout) { return ErrorCode::Undefined; }

virtual ErrorCode Merge(const SizeType key, const std::string &value,
const std::chrono::microseconds &timeout,
std::vector<Helper::AsyncReadRequest> *reqs, int& size) = 0;

virtual ErrorCode MultiMerge(const std::vector<SizeType>& keys, const std::vector<std::string>& values,
const std::chrono::microseconds& timeout, std::vector<Helper::AsyncReadRequest>* reqs, std::vector<int>& sizes) {
Comment thread
zqxjjj marked this conversation as resolved.
if (keys.size() != values.size()) {
return ErrorCode::Undefined;
}
sizes.resize(keys.size());
for (size_t i = 0; i < keys.size(); i++) {
auto err = Merge(keys[i], values[i], timeout, reqs, sizes[i]);
if (err != ErrorCode::Success) {
return err;
}
}
return ErrorCode::Success;
}

virtual ErrorCode Delete(SizeType key) = 0;

virtual ErrorCode DeleteRange(SizeType start, SizeType end) {return ErrorCode::Undefined;}
Expand Down Expand Up @@ -79,6 +80,8 @@ namespace SPTAG
virtual ErrorCode StartToScan(SizeType& key, std::string* value) {return ErrorCode::Undefined;}

virtual ErrorCode NextToScan(SizeType& key, std::string* value) {return ErrorCode::Undefined;}

virtual void LogAsyncWaitStatsAndReset(int layer) {}
};
}
}
Expand Down
17 changes: 13 additions & 4 deletions AnnService/inc/Helper/ThreadPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define _SPTAG_HELPER_THREADPOOL_H_

#include <atomic>
#include <queue>
#include <deque>
#include <vector>
#include <thread>
#include <mutex>
Expand Down Expand Up @@ -78,7 +78,16 @@ namespace SPTAG
{
{
std::lock_guard<std::mutex> lock(m_lock);
m_jobs.push(j);
m_jobs.push_back(j);
}
m_cond.notify_one();
}

void addfront(Job* j)
{
{
std::lock_guard<std::mutex> lock(m_lock);
m_jobs.push_front(j);
}
m_cond.notify_one();
}
Expand All @@ -90,7 +99,7 @@ namespace SPTAG
if (!m_abort.ShouldAbort()) {
j = m_jobs.front();
currentJobs++;
m_jobs.pop();
m_jobs.pop_front();
return true;
}
return false;
Expand All @@ -113,7 +122,7 @@ namespace SPTAG

protected:
std::atomic_uint32_t currentJobs{ 0 };
std::queue<Job*> m_jobs;
std::deque<Job*> m_jobs;
Abort m_abort;
std::mutex m_lock;
std::condition_variable m_cond;
Expand Down
Loading