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

Siyao Meng updated HDDS-8268:
-----------------------------
    Description: 
We could try to enable some [spotbugs|https://spotbugs.github.io/] that could 
have caught a bunch of not-closed handles before a commit is merged.

For instance,

bq. OBL: Method may fail to clean up stream or resource 
(OBL_UNSATISFIED_OBLIGATION)

https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#obl-method-may-fail-to-clean-up-stream-or-resource-obl-unsatisfied-obligation

and

bq. OBL: Method may fail to clean up stream or resource on checked exception 
(OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE)

https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#obl-method-may-fail-to-clean-up-stream-or-resource-on-checked-exception-obl-unsatisfied-obligation-exception-edge

could come in handy.

Just recently we have quite a few PRs just to fix the leaking handles:

1. HDDS-8251. RocksIterator is not closed properly in snapshot
2. HDDS-8265. ManagedColumnFamilyOptions is not closed properly in 
OmSnapshotManager
3. HDDS-8163. Use try-with-resources to ensure close rockdb connection in 
SstFilteringService
4. HDDS-7958. Ozone client not closed in integration tests
5. HDDS-8145. ReadReplicas should close client

Not sure about the false-positive rate though. Have to try to find out.

---

Looks like we explicitly disabled the checks for some of the tests:

https://github.com/apache/ozone/blob/68eb26d70e43648ea9270d9efa7664312a1947f9/hadoop-ozone/tools/dev-support/findbugsExcludeFile.xml#L17-L20

https://github.com/apache/ozone/blob/68eb26d70e43648ea9270d9efa7664312a1947f9/hadoop-ozone/recon/dev-support/findbugsExcludeFile.xml#L42-L53

Does it mean the handle leak checks are already enabled for the rest?

  was:
We could try to enable some [spotbugs|https://spotbugs.github.io/] that could 
have caught a bunch of not-closed handles before a commit is merged.

For instance,

bq. OBL: Method may fail to clean up stream or resource 
(OBL_UNSATISFIED_OBLIGATION)

https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#obl-method-may-fail-to-clean-up-stream-or-resource-obl-unsatisfied-obligation

and

bq. OBL: Method may fail to clean up stream or resource on checked exception 
(OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE)

https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#obl-method-may-fail-to-clean-up-stream-or-resource-on-checked-exception-obl-unsatisfied-obligation-exception-edge

could come in handy.

Just recently we have quite a few PRs just to fix the leaking handles:

1. HDDS-8251. RocksIterator is not closed properly in snapshot
2. HDDS-8265. ManagedColumnFamilyOptions is not closed properly in 
OmSnapshotManager
3. HDDS-8163. Use try-with-resources to ensure close rockdb connection in 
SstFilteringService
4. HDDS-7958. Ozone client not closed in integration tests
5. HDDS-8145. ReadReplicas should close client

Not sure about the false-positive rate though. Have to try to find out.

---

Looks like we explicitly disabled the checks for some of the tests:

https://github.com/apache/ozone/blob/68eb26d70e43648ea9270d9efa7664312a1947f9/hadoop-ozone/tools/dev-support/findbugsExcludeFile.xml#L17-L20

https://github.com/apache/ozone/blob/68eb26d70e43648ea9270d9efa7664312a1947f9/hadoop-ozone/recon/dev-support/findbugsExcludeFile.xml#L42-L53

Does it mean they are enabled already for the rest?


> spotbugs: enable resource clean up check
> ----------------------------------------
>
>                 Key: HDDS-8268
>                 URL: https://issues.apache.org/jira/browse/HDDS-8268
>             Project: Apache Ozone
>          Issue Type: Wish
>          Components: CI
>            Reporter: Siyao Meng
>            Priority: Major
>
> We could try to enable some [spotbugs|https://spotbugs.github.io/] that could 
> have caught a bunch of not-closed handles before a commit is merged.
> For instance,
> bq. OBL: Method may fail to clean up stream or resource 
> (OBL_UNSATISFIED_OBLIGATION)
> https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#obl-method-may-fail-to-clean-up-stream-or-resource-obl-unsatisfied-obligation
> and
> bq. OBL: Method may fail to clean up stream or resource on checked exception 
> (OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE)
> https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#obl-method-may-fail-to-clean-up-stream-or-resource-on-checked-exception-obl-unsatisfied-obligation-exception-edge
> could come in handy.
> Just recently we have quite a few PRs just to fix the leaking handles:
> 1. HDDS-8251. RocksIterator is not closed properly in snapshot
> 2. HDDS-8265. ManagedColumnFamilyOptions is not closed properly in 
> OmSnapshotManager
> 3. HDDS-8163. Use try-with-resources to ensure close rockdb connection in 
> SstFilteringService
> 4. HDDS-7958. Ozone client not closed in integration tests
> 5. HDDS-8145. ReadReplicas should close client
> Not sure about the false-positive rate though. Have to try to find out.
> ---
> Looks like we explicitly disabled the checks for some of the tests:
> https://github.com/apache/ozone/blob/68eb26d70e43648ea9270d9efa7664312a1947f9/hadoop-ozone/tools/dev-support/findbugsExcludeFile.xml#L17-L20
> https://github.com/apache/ozone/blob/68eb26d70e43648ea9270d9efa7664312a1947f9/hadoop-ozone/recon/dev-support/findbugsExcludeFile.xml#L42-L53
> Does it mean the handle leak checks are already enabled for the rest?



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to