leofs icon indicating copy to clipboard operation
leofs copied to clipboard

[leofs_doctor] Add compaction related info

Open mocchira opened this issue 7 years ago • 3 comments

With #671, we can include the compaction related info in https://github.com/leo-project/leofs_doctor when the target node is leo_storage.

mocchira avatar Apr 07 '17 01:04 mocchira

@mocchira do you have any good ideas to list out all eleveldb instances in a node?

windkit avatar May 17 '17 08:05 windkit

@windkit

Based on the fact we know where the leo_backend_db (eleveldb) are used and all related erlang processes are named, we can list out all in a node.

For metadata, Related processes are name leo_metadata_*

For queue, Those are named as below.

  • leo_per_object_queue_*
  • leo_sync_by_vnode_id_queue_*
  • leo_directory_queue_*
  • leo_rebalance_queue_*
  • leo_async_deletion_queue_*
  • leo_recovery_node_queue_*
  • leo_sync_obj_with_dc_queue_*
  • leo_comp_meta_with_dc_queue_*
  • leo_delete_dir_queue_*
  • leo_req_delete_dir_queue_*

according to https://github.com/leo-project/leofs/blob/1.3.4/apps/leo_storage/include/leo_storage.hrl#L55-L64.

I think it would be sufficient to pass the maximum number suffixed through the command line arguments.

mocchira avatar May 17 '17 08:05 mocchira

@windkit Another solution (which might be better than the prev one) is listing up all erlang processes (http://erlang.org/doc/man/erlang.html#processes-0) then filter by initial_call == {leo_backend_db_server, init, _} with http://erlang.org/doc/man/erlang.html#process_info-2. With this way, leofs_doctor keeps working even if a new queue is added to leofs.

mocchira avatar May 18 '17 04:05 mocchira