Skip to content

Add local kv cache store for vllm - #2063

Open
vegetableysm wants to merge 2 commits into
v6d-io:mainfrom
vegetableysm:kvs
Open

Add local kv cache store for vllm#2063
vegetableysm wants to merge 2 commits into
v6d-io:mainfrom
vegetableysm:kvs

Format code.

640485e
Select commit
Loading
Failed to load commit list.
Codacy Production / Codacy Static Code Analysis required action Nov 18, 2025 in 0s

22 new issues (0 max.) of at least severity.

Codacy Here is an overview of what got changed by this pull request:

Issues
======
- Added 22
           

Complexity increasing per file
==============================
- src/server/server/vineyard_server.cc  86
- src/server/async/socket_server.cc  158
- src/server/memory/stream_store.cc  111
- src/server/memory/memory.cc  14
- python/client.cc  3
- src/server/memory/memory.h  4
- src/client/ds/blob.cc  9
- src/common/util/env.cc  3
- src/client/client.cc  79
- src/server/async/socket_server.h  2
- src/common/util/json.h  1
- src/server/memory/stream_store.h  25
- src/common/util/protocols.cc  161
- src/client/client_base.cc  10
- src/server/server/vineyard_server.h  6
- src/server/memory/malloc.cc  5
- src/server/services/meta_service.h  2
- src/client/ds/blob.h  13
- src/common/memory/payload.h  1
- src/server/async/rpc_server.cc  1
- src/server/memory/usage.h  5
- src/server/util/remote.cc  10
- src/server/util/remote.h  3
- python/vineyard/core/client.py  31
- modules/vllm-kv-cache/src/storage/vllm_kv_storage.cc  248
- modules/vllm-kv-cache/src/io/aio_adaptor.cc  119
- modules/vllm-kv-cache/src/io/io_adaptor.h  10
- python/vineyard/core/tests/fixed_stream_sender.py  9
- modules/vllm-kv-cache/src/io/mock_aio_operations.cc  68
- python/vineyard/io/fixed_blob.py  45
- src/common/util/sidecar.cc  23
- python/vineyard/core/tests/fixed_stream_receiver.py  15
- src/server/util/utils.h  3
- modules/vllm-kv-cache/ds/vllm_layer.cc  36
- modules/vllm-kv-cache/src/io/posix_io_adaptor.cc  19
- modules/vllm-kv-cache/src/io/aio_operations.cc  6
- modules/vllm-kv-cache/tests/vllm_storage_local_test.cc  42
- src/server/util/remote_pool.h  1
- modules/vllm-kv-cache/src/vllm_kv_cache_util.cc  24
- modules/vllm-kv-cache/src/io/posix_io_adaptor.h  1
- modules/vllm-kv-cache/src/io/mock_io_adapter.cc  33
- src/common/util/sidecar.h  9
- modules/vllm-kv-cache/src/storage/vllm_kv_storage.h  8
- modules/vllm-kv-cache/src/io/mock_aio_operations.h  1
- modules/basic/stream/fixed_blob_stream.cc  28
- modules/basic/stream/fixed_blob_stream.h  10
- modules/vllm-kv-cache/src/env.cc  15
- modules/vllm-kv-cache/src/io/aio_adaptor.h  6
- modules/vllm-kv-cache/src/io/error_injection.cc  19
- modules/vllm-kv-cache/src/vllm_kv_cache_util.h  1
- modules/vllm-kv-cache/ds/vllm_block.cc  49
- src/common/util/get_tid.h  2
- src/common/util/monitor.h  22
- src/common/util/trace.h  9
- src/server/util/remote_pool.cc  10
- modules/vllm-kv-cache/ds/vllm_layer.h  3
- modules/vllm-kv-cache/ds/vllm_block.h  14
         

Clones added
============
- src/server/server/vineyard_server.cc  15
- src/server/async/socket_server.cc  63
- src/server/memory/stream_store.cc  16
- src/client/ds/blob.cc  7
- src/client/client.cc  53
- src/server/memory/stream_store.h  3
- src/common/util/protocols.cc  7
- src/server/async/rpc_server.cc  1
- modules/vllm-kv-cache/src/storage/vllm_kv_storage.cc  120
- modules/vllm-kv-cache/src/io/aio_adaptor.cc  67
- modules/vllm-kv-cache/src/io/mock_io_adapter.h  2
- modules/vllm-kv-cache/src/io/io_adaptor.h  4
- modules/vllm-kv-cache/src/io/mock_aio_operations.cc  4
- python/vineyard/io/fixed_blob.py  2
- modules/vllm-kv-cache/ds/vllm_layer.cc  7
- modules/vllm-kv-cache/src/io/posix_io_adaptor.cc  4
- modules/vllm-kv-cache/tests/vllm_storage_local_test.cc  2
- modules/vllm-kv-cache/src/storage/vllm_kv_storage.h  60
- modules/vllm-kv-cache/src/io/aio_operations.h  1
- modules/vllm-kv-cache/src/io/mock_aio_operations.h  1
- modules/vllm-kv-cache/src/io/aio_adaptor.h  2
- modules/vllm-kv-cache/ds/vllm_block.cc  7
- modules/vllm-kv-cache/ds/vllm_block.h  2
         

Clones removed
==============
+ src/client/rpc_client.cc  -1
+ src/server/util/remote.cc  -1
         

See the complete overview on Codacy

Annotations

Check warning on line 50 in python/vineyard/core/client.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/core/client.py#L50

Unused get_current_resolvers imported from vineyard.core.resolver

Check warning on line 53 in python/vineyard/core/client.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/core/client.py#L53

Too many instance attributes (8/7)

Check notice on line 76 in python/vineyard/core/client.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/core/client.py#L76

Unnecessary pass statement

Check warning on line 744 in python/vineyard/core/client.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/core/client.py#L744

Too many positional arguments (9/5)

Check warning on line 760 in python/vineyard/core/client.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/core/client.py#L760

Too many positional arguments (9/5)

Check warning on line 25 in python/vineyard/core/tests/fixed_stream_receiver.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/core/tests/fixed_stream_receiver.py#L25

No name '_C' in module 'vineyard'

Check warning on line 25 in python/vineyard/core/tests/fixed_stream_receiver.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/core/tests/fixed_stream_receiver.py#L25

Unused ObjectID imported from vineyard._C

Check notice on line 33 in python/vineyard/core/tests/fixed_stream_receiver.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/core/tests/fixed_stream_receiver.py#L33

Unused argument 'ipc_socket'

Check warning on line 89 in python/vineyard/core/tests/fixed_stream_receiver.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/core/tests/fixed_stream_receiver.py#L89

Either all return statements in a function should return an expression, or none of them should.

Check notice on line 31 in python/vineyard/core/tests/fixed_stream_sender.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/core/tests/fixed_stream_sender.py#L31

Unused argument 'client'

Check notice on line 32 in python/vineyard/core/tests/fixed_stream_sender.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/core/tests/fixed_stream_sender.py#L32

Unused argument 'stream_id'

Check warning on line 79 in python/vineyard/core/tests/fixed_stream_sender.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/core/tests/fixed_stream_sender.py#L79

Either all return statements in a function should return an expression, or none of them should.

Check warning on line 27 in python/vineyard/io/fixed_blob.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/io/fixed_blob.py#L27

No name '_C' in module 'vineyard'

Check warning on line 28 in python/vineyard/io/fixed_blob.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/io/fixed_blob.py#L28

No name '_C' in module 'vineyard'

Check warning on line 28 in python/vineyard/io/fixed_blob.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/io/fixed_blob.py#L28

Unused ObjectID imported from vineyard._C

Check warning on line 29 in python/vineyard/io/fixed_blob.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/io/fixed_blob.py#L29

No name '_C' in module 'vineyard'

Check warning on line 34 in python/vineyard/io/fixed_blob.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/io/fixed_blob.py#L34

Too many instance attributes (10/7)

Check warning on line 46 in python/vineyard/io/fixed_blob.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/io/fixed_blob.py#L46

Too many positional arguments (6/5)

Check warning on line 66 in python/vineyard/io/fixed_blob.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/io/fixed_blob.py#L66

__init__ method from base class 'Reader' is not called

Check warning on line 99 in python/vineyard/io/fixed_blob.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/io/fixed_blob.py#L99

Parameter 'chunk' has been renamed to 'offset' in overriding 'Writer.append' method

Check warning on line 123 in python/vineyard/io/fixed_blob.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/io/fixed_blob.py#L123

Signature differs from overridden 'open_writer' method

Check warning on line 172 in python/vineyard/io/fixed_blob.py

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

python/vineyard/io/fixed_blob.py#L172

Assigning the same variable 'error_msg' to itself