[ 
https://issues.apache.org/jira/browse/RATIS-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tsz-wo Sze resolved RATIS-1705.
-------------------------------
    Fix Version/s: 3.0.0
       Resolution: Fixed

The pull request is now merged.  Thanks, [~XiChen]!

> Fix metrics leak 
> -----------------
>
>                 Key: RATIS-1705
>                 URL: https://issues.apache.org/jira/browse/RATIS-1705
>             Project: Ratis
>          Issue Type: Bug
>          Components: metrics
>            Reporter: ChenXi
>            Assignee: ChenXi
>            Priority: Major
>             Fix For: 3.0.0
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> How to reproduce bugs:
>  # an ozone cluster with s3g components.
>  # mutliupload an object to s3g.
> It is very important that you use an s3g that is not receiving any other 
> requests before doing a mutliupload. In other words, *the mutliupload must be 
> the first request received by the s3g after it starts.*
> there is a mutliupload example code:
> {code:python}
> import boto3
> from boto3.s3.transfer import TransferConfig
> # boto3 maybe need install
> MB = 1024 * 1024
> s3 = boto3.resource('s3')
> MultipartChunkSize = 5 * MB
> MaxConcurrency = 10
> AccessKeyID = "user_id"
> SecretAccessKey = "user_key"
> BucketRegion = "dummyregion"
> BucketName = "testbucket"
> EndpointUrl = "http://localhost:9878";
> LocalFilePath = "/root/50M.img"
> ObjectKeyName = "key_from_py"
> def multipart_upload(client, local_file_path, bucket_name, object_key, 
> multipart_chunksize,
>                      max_concurrency):
>     config = TransferConfig(multipart_chunksize=multipart_chunksize,
>                             max_concurrency=max_concurrency)
>     client.upload_file(local_file_path, bucket_name, object_key, 
> Config=config)
> if __name__ == '__main__':
>     client = boto3.client('s3',
>                           endpoint_url=EndpointUrl,
>                           aws_access_key_id=AccessKeyID,
>                           aws_secret_access_key=SecretAccessKey)
>     multipart_upload(client, LocalFilePath, BucketName, ObjectKeyName, 
> MultipartChunkSize,
>                          MaxConcurrency)
> {code}
>  
> After that, every time upload(mutliupload / normal upload), the ratis grpc 
> metrics will increase,
> You can run
> {code:java}
> curl -s http://{you_address}:9878/jmx | grep client_message_metrics | wc -l 
> {code}
> to verify that
> *With the increase of the index, it may lead to s3g OOM*



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to