Skip to content

Commit fd59d50

Browse files
Merge branch 'deepseek-ai:main' into main
2 parents 25163e8 + 0fd4d9b commit fd59d50

File tree

6 files changed

+18
-20
lines changed

6 files changed

+18
-20
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,6 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313

14-
- name: Configure sccache-cache
15-
run: |
16-
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
17-
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
18-
19-
- name: Run sccache-cache
20-
uses: mozilla-actions/[email protected]
21-
2214
- name: Prepare
2315
run: |
2416
sudo apt install -y cmake libuv1-dev liblz4-dev liblzma-dev libdouble-conversion-dev libdwarf-dev libunwind-dev

src/client/cli/admin/SetPreferredTargetOrder.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace {
1313
auto getParser() {
1414
argparse::ArgumentParser parser("set-preferred-target-order");
1515
parser.add_argument("chainId").scan<'u', uint32_t>();
16-
parser.add_argument("targetIds").scan<'u', uint32_t>().remaining();
16+
parser.add_argument("targetIds").scan<'u', uint64_t>().remaining();
1717
return parser;
1818
}
1919

@@ -25,9 +25,9 @@ CoTryTask<Dispatcher::OutputTable> handle(IEnv &ienv,
2525
Dispatcher::OutputTable table;
2626

2727
auto cid = flat::ChainId(parser.get<uint32_t>("chainId"));
28-
auto targetIds = parser.get<std::vector<uint32_t>>("targetIds");
28+
auto targetIds = parser.get<std::vector<uint64_t>>("targetIds");
2929
auto tids = transformTo<std::vector>(std::span{targetIds.begin(), targetIds.size()},
30-
[](uint32_t id) { return flat::TargetId(id); });
30+
[](uint64_t id) { return flat::TargetId(id); });
3131
auto res = co_await env.mgmtdClientGetter()->setPreferredTargetOrder(env.userInfo, cid, tids);
3232
CO_RETURN_ON_ERROR(res);
3333

src/fbs/meta/FileOperation.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ CoTryTask<std::map<flat::ChainId, FileOperation::QueryResult>> FileOperation::qu
132132
}
133133

134134
XLOGF(ERR,
135-
"Failed to quertLastChunk from chain {}, err {}",
135+
"Failed to queryLastChunk from chain {}, err {}",
136136
flat::ChainId(query.routingTarget.chainId),
137137
result.statusCode.error());
138138
ADD_FAILED(queryChunksFailed, result.statusCode.error().code());

src/fuse/IoRing.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct IoRingJob {
4848

4949
// we allow multiple io workers to process the same ioring, but different ranges
5050
// so 1 ioring can be used to submit ios processed in parallel
51-
// howoever, we don't allow multiple threads to prepare ios in the same ioring
51+
// however, we don't allow multiple threads to prepare ios in the same ioring
5252
// or batches may be mixed and things may get ugly
5353
class IoRing : public std::enable_shared_from_this<IoRing> {
5454
public:

src/storage/chunk_engine/src/core/engine.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -656,22 +656,28 @@ impl Engine {
656656
end: impl AsRef<[u8]>,
657657
max_count: u64,
658658
) -> Result<u64> {
659-
let mut chunks = self.meta_store.query_chunks(begin, end, max_count)?;
659+
let chunks = self.meta_store.query_chunks(begin, end, max_count)?;
660+
let mut offset = 0;
660661

661662
const BATCH_SIZE: Size = Size::mebibyte(1);
662663
let mut write_batch = RocksDB::new_write_batch();
663-
for (chunk_id, meta) in &mut chunks {
664-
if write_batch.size_in_bytes() >= BATCH_SIZE.0 as usize {
664+
for (index, (chunk_id, meta)) in chunks.iter().enumerate() {
665+
if write_batch.size_in_bytes() >= BATCH_SIZE.0 as _ {
665666
self.meta_store.write(write_batch, true)?;
666667
write_batch = RocksDB::new_write_batch();
668+
for (chunk_id, _) in &chunks[offset..index] {
669+
self.meta_cache.remove(chunk_id);
670+
}
671+
offset = index;
667672
}
668-
669673
self.meta_store
670-
.remove_mut(chunk_id, meta, &mut write_batch)?;
671-
self.meta_cache.remove(chunk_id);
674+
.remove_mut(&chunk_id, &meta, &mut write_batch)?;
672675
}
673676
if !write_batch.is_empty() {
674677
self.meta_store.write(write_batch, true)?;
678+
for (chunk_id, _) in &chunks[offset..] {
679+
self.meta_cache.remove(chunk_id);
680+
}
675681
}
676682
Ok(chunks.len() as _)
677683
}

src/storage/sync/ResyncWorker.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ CoTryTask<void> ResyncWorker::handleSync(VersionedChainId vChainId) {
279279
XLOG(CRITICAL, msg);
280280

281281
OfflineTargetReq req;
282-
req.targetId = targetId;
282+
req.targetId = target->successor->targetInfo.targetId;
283283
req.force = true;
284284
CO_RETURN_AND_LOG_ON_ERROR(co_await components_.messenger.offlineTarget(*addrResult, req, &options));
285285

0 commit comments

Comments
 (0)