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: deletes newly created volumes #4551

Merged
merged 1 commit into from
Jun 6, 2023

Conversation

kmlebedev
Copy link
Contributor

What problem are we solving?

#4531

How are we solving the problem?

skip deleting if ModifiedAtSecond not set

How is the PR tested?

Checks

  • I have added unit tests if possible.
  • I will add related wiki document changes and link to this PR after merging.

@kmlebedev
Copy link
Contributor Author

> volume.list
Topology volumeSizeLimit:30000 MB hdd(volume:0/8 active:0 free:8 remote:0)
  DataCenter DefaultDataCenter hdd(volume:0/8 active:0 free:8 remote:0)
    Rack DefaultRack hdd(volume:0/8 active:0 free:8 remote:0)
      DataNode volume:8080 hdd(volume:0/8 active:0 free:8 remote:0)
        Disk hdd(volume:0/8 active:0 free:8 remote:0)
        Disk hdd total size:0 file_count:0 
      DataNode volume:8080 total size:0 file_count:0 
    Rack DefaultRack total size:0 file_count:0 
  DataCenter DefaultDataCenter total size:0 file_count:0 
total size:0 file_count:0 
> volume.list
Topology volumeSizeLimit:30000 MB hdd(volume:8/8 active:8 free:0 remote:0)
  DataCenter DefaultDataCenter hdd(volume:8/8 active:8 free:0 remote:0)
    Rack DefaultRack hdd(volume:8/8 active:8 free:0 remote:0)
      DataNode volume:8080 hdd(volume:8/8 active:8 free:0 remote:0)
        Disk hdd(volume:8/8 active:8 free:0 remote:0)
          volume id:1  collection:"test"  version:3  modified_at_second:1686037950 
          volume id:2  collection:"test"  version:3 
          volume id:3  collection:"test"  version:3 
          volume id:4  collection:"test"  version:3 
          volume id:5  collection:"test"  version:3  modified_at_second:1686037950 
          volume id:6  collection:"test"  version:3  modified_at_second:1686037950 
          volume id:7  collection:"test"  version:3 
          volume id:8  collection:"test"  version:3  modified_at_second:1686037950 
        Disk hdd total size:0 file_count:0 
      DataNode volume:8080 total size:0 file_count:0 
    Rack DefaultRack total size:0 file_count:0 
  DataCenter DefaultDataCenter total size:0 file_count:0 
total size:0 file_count:0 
> volume.list
Topology volumeSizeLimit:30000 MB hdd(volume:8/8 active:8 free:0 remote:0)
  DataCenter DefaultDataCenter hdd(volume:8/8 active:8 free:0 remote:0)
    Rack DefaultRack hdd(volume:8/8 active:8 free:0 remote:0)
      DataNode volume:8080 hdd(volume:8/8 active:8 free:0 remote:0)
        Disk hdd(volume:8/8 active:8 free:0 remote:0)
          volume id:1  collection:"test"  version:3  modified_at_second:1686037950 
          volume id:2  collection:"test"  version:3 
          volume id:3  collection:"test"  version:3 
          volume id:4  collection:"test"  version:3 
          volume id:5  collection:"test"  version:3  modified_at_second:1686037950 
          volume id:6  collection:"test"  version:3  modified_at_second:1686037950 
          volume id:7  collection:"test"  version:3 
          volume id:8  collection:"test"  version:3  modified_at_second:1686037950 
        Disk hdd total size:0 file_count:0 
      DataNode volume:8080 total size:0 file_count:0 
    Rack DefaultRack total size:0 file_count:0 
  DataCenter DefaultDataCenter total size:0 file_count:0 
total size:0 file_count:0 
> volume.list
Topology volumeSizeLimit:30000 MB hdd(volume:8/8 active:8 free:0 remote:0)
  DataCenter DefaultDataCenter hdd(volume:8/8 active:8 free:0 remote:0)
    Rack DefaultRack hdd(volume:8/8 active:8 free:0 remote:0)
      DataNode volume:8080 hdd(volume:8/8 active:8 free:0 remote:0)
        Disk hdd(volume:8/8 active:8 free:0 remote:0)
          volume id:1  collection:"test"  version:3  modified_at_second:1686037950 
          volume id:2  collection:"test"  version:3 
          volume id:3  collection:"test"  version:3 
          volume id:4  collection:"test"  version:3 
          volume id:5  collection:"test"  version:3  modified_at_second:1686037950 
          volume id:6  collection:"test"  version:3  modified_at_second:1686037950 
          volume id:7  collection:"test"  version:3 
          volume id:8  collection:"test"  version:3  modified_at_second:1686037950 
        Disk hdd total size:0 file_count:0 
      DataNode volume:8080 total size:0 file_count:0 
    Rack DefaultRack total size:0 file_count:0 
  DataCenter DefaultDataCenter total size:0 file_count:0 
total size:0 file_count:0 
> volume.list
Topology volumeSizeLimit:30000 MB hdd(volume:8/8 active:8 free:0 remote:0)
  DataCenter DefaultDataCenter hdd(volume:8/8 active:8 free:0 remote:0)
    Rack DefaultRack hdd(volume:8/8 active:8 free:0 remote:0)
      DataNode volume:8080 hdd(volume:8/8 active:8 free:0 remote:0)
        Disk hdd(volume:8/8 active:8 free:0 remote:0)
          volume id:1  collection:"test"  version:3  modified_at_second:1686037950 
          volume id:2  collection:"test"  version:3 
          volume id:3  collection:"test"  version:3 
          volume id:4  collection:"test"  version:3 
          volume id:5  collection:"test"  version:3  modified_at_second:1686037950 
          volume id:6  collection:"test"  version:3  modified_at_second:1686037950 
          volume id:7  collection:"test"  version:3 
          volume id:8  collection:"test"  version:3  modified_at_second:1686037950 
        Disk hdd total size:0 file_count:0 
      DataNode volume:8080 total size:0 file_count:0 
    Rack DefaultRack total size:0 file_count:0 
  DataCenter DefaultDataCenter total size:0 file_count:0 
total size:0 file_count:0 
> volume.list
Topology volumeSizeLimit:30000 MB hdd(volume:8/8 active:8 free:0 remote:0)
  DataCenter DefaultDataCenter hdd(volume:8/8 active:8 free:0 remote:0)
    Rack DefaultRack hdd(volume:8/8 active:8 free:0 remote:0)
      DataNode volume:8080 hdd(volume:8/8 active:8 free:0 remote:0)
        Disk hdd(volume:8/8 active:8 free:0 remote:0)
          volume id:1  size:654160  collection:"test"  file_count:1  version:3  modified_at_second:1686037950 
          volume id:2  size:1819640  collection:"test"  file_count:3  version:3  modified_at_second:1686037950 
          volume id:3  size:1445120  collection:"test"  file_count:2  delete_count:1  deleted_byte_count:1080699  version:3  modified_at_second:1686037951 
          volume id:4  size:12520  collection:"test"  file_count:1  version:3  modified_at_second:1686037951 
          volume id:5  size:620024  collection:"test"  file_count:1  version:3  modified_at_second:1686037950 
          volume id:6  size:682120  collection:"test"  file_count:1  delete_count:1  deleted_byte_count:682046  version:3  modified_at_second:1686037951 
          volume id:7  size:4875160  collection:"test"  file_count:2  version:3  modified_at_second:1686037950 
          volume id:8  size:4059936  collection:"test"  file_count:1  delete_count:1  deleted_byte_count:4059865  version:3  modified_at_second:1686037951 
        Disk hdd total size:14168680 file_count:12 deleted_file:3 deleted_bytes:5822610 
      DataNode volume:8080 total size:14168680 file_count:12 deleted_file:3 deleted_bytes:5822610 
    Rack DefaultRack total size:14168680 file_count:12 deleted_file:3 deleted_bytes:5822610 
  DataCenter DefaultDataCenter total size:14168680 file_count:12 deleted_file:3 deleted_bytes:5822610 
total size:14168680 file_count:12 deleted_file:3 deleted_bytes:5822610 

@chrislusf chrislusf merged commit 5caff2c into seaweedfs:master Jun 6, 2023
5 checks passed
kmlebedev added a commit to kmlebedev/seaweedfs that referenced this pull request Dec 22, 2023
seaweedfs#4531

Co-authored-by: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants