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

[Bug]: Using Milvus Docker Compose, in /var/lib/milvus, there is no data. #33532

Open
1 task done
shizhengLi opened this issue Jun 1, 2024 · 2 comments
Open
1 task done
Assignees
Labels
help wanted Extra attention is needed

Comments

@shizhengLi
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version:milvus:v2.4.4
- Deployment mode(standalone or cluster): standalone
- MQ type(rocksmq, pulsar or kafka):    
- SDK version(e.g. pymilvus v2.0.0rc2): pymilvus Version: 2.4.3
- OS(Ubuntu or CentOS): Ubuntu 20
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

I sudo docker compose up -d to activate the container, there is milvus-standalone.

Then I insert data into milvus

from pymilvus import connections, FieldSchema, CollectionSchema, DataType, Collection

connections.connect("default", host="localhost", port="19530")

fields = [
    FieldSchema(name="ID", dtype=DataType.INT64, is_primary=True),
    FieldSchema(name="embedding", dtype=DataType.FLOAT_VECTOR, dim=768)
]

schema = CollectionSchema(fields, "Example collection")
collection = Collection("example_collection", schema)

data = [
    [i for i in range(3)],  
    [[0.1] * 768, [0.2] * 768, [0.3] * 768]  
]
collection.insert(data)

index_params = {
    "index_type": "IVF_FLAT",
    "metric_type": "L2",
    "params": {"nlist": 128}
}
index = Index(collection, "embedding", index_params)
print("Index created on 'embedding' field.")

collection.create_index(field_name="embedding", index_params=index_params)
print("Index creation confirmed.")

collection.load()

print("Number of entities in collection:", collection.num_entities)

And It works smoothly and normally.

Here is the log:

2024/06/01 07:13:55.997 +00:00] [INFO] [datacoord/index_service.go:603] ["completeIndexInfo success"] [collectionID=450159417284452390] [indexID=450159417284452509] [totalRows=0] [indexRows=0] [pendingIndexRows=0] [state=Finished] [failReason=]
[2024/06/01 07:13:55.997 +00:00] [INFO] [datacoord/index_service.go:730] ["DescribeIndex success"] [traceID=b7c288b3453078ad022a0ade679a37d4] [collectionID=450159417284452390] [indexName=]
[2024/06/01 07:13:55.997 +00:00] [INFO] [datacoord/index_service.go:682] ["receive DescribeIndex request"] [traceID=b7c288b3453078ad022a0ade679a37d4] [collectionID=450159771378479723] [indexName=] [timestamp=0]
[2024/06/01 07:13:55.997 +00:00] [INFO] [datacoord/index_service.go:603] ["completeIndexInfo success"] [collectionID=450159771378479723] [indexID=450159771378680031] [totalRows=0] [indexRows=0] [pendingIndexRows=0] [state=Finished] [failReason=]
[2024/06/01 07:13:55.997 +00:00] [INFO] [datacoord/index_service.go:730] ["DescribeIndex success"] [traceID=b7c288b3453078ad022a0ade679a37d4] [collectionID=450159771378479723] [indexName=]

And the docker-compose.yml is as follows:

standalone:
    container_name: milvus-standalone
    image: milvusdb/milvus:v2.4.4
    command: ["milvus", "run", "standalone"]
    security_opt:
    - seccomp:unconfined
    environment:
      ETCD_ENDPOINTS: etcd:2379
      MINIO_ADDRESS: minio:9000
    volumes:
      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus

milvus.yaml in docker:

localStorage:
  path: /var/lib/milvus/data/ # please adjust in embedded Milvus: /tmp/milvus/data/

The question is:

I can't locate where the data is , I step into docker container, and there is no data in the directory.

oot@6ae7adb5d03a:/var/lib/milvus# ls
data  rdb_data  rdb_data_meta_kv
root@6ae7:/var/lib/milvus# cd data/
root@6ae7a:/var/lib/milvus/data# ls
root@6ae7:/var/lib/milvus/data# cd 

Where is the data located?

But I use Attu, I can find the collection name and data, but I can't find them in my docker and the corresponding ./volumes/milvus directory in my local machine.

Expected Behavior

The /var/lib/milvus directory should have data.

Steps To Reproduce

No response

Milvus Log

No response

Anything else?

No response

@shizhengLi shizhengLi added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 1, 2024
@xiaofan-luan
Copy link
Contributor

if you use docker compose .
the data should in minio data path, not in milvus.
If you use docker deployment without minio, then data path should use local storage

@yanliang567
Copy link
Contributor

/assign @shizhengLi
/unassign

@yanliang567 yanliang567 added help wanted Extra attention is needed and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. kind/bug Issues or changes related a bug labels Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants