phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoffrey Jacoby (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-4066) Unused variable in MutationState.send()
Date Fri, 04 Aug 2017 17:12:00 GMT

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

Geoffrey Jacoby updated PHOENIX-4066:
-------------------------------------
    Description: 
In MutationState#send, we always allocate the following:

List<TableRef> txTableRefs = Lists.newArrayListWithExpectedSize(mutations.size());

and if a table's transactional, we populate it:

txTableRefs.add(origTableRef);`

but this is never referred to again in either logic or logging, and it's a local variable
so we can't be using it elsewhere either. It should be removed or used (and if used, it should
only be allocated in the transactional use case.)

  was:
In MutationState#send, we always allocate the following:

```
List<TableRef> txTableRefs = Lists.newArrayListWithExpectedSize(mutations.size());
```
and if a table's transactional, we populate it:

```
txTableRefs.add(origTableRef);
```

but this is never referred to again in either logic or logging, and it's a local variable
so we can't be using it elsewhere either. It should be removed or used (and if used, it should
only be allocated in the transactional use case.)


> Unused variable in MutationState.send()
> ---------------------------------------
>
>                 Key: PHOENIX-4066
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4066
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 4.11.0
>            Reporter: Geoffrey Jacoby
>            Priority: Trivial
>              Labels: beginner
>             Fix For: 4.12.0
>
>
> In MutationState#send, we always allocate the following:
> List<TableRef> txTableRefs = Lists.newArrayListWithExpectedSize(mutations.size());
> and if a table's transactional, we populate it:
> txTableRefs.add(origTableRef);`
> but this is never referred to again in either logic or logging, and it's a local variable
so we can't be using it elsewhere either. It should be removed or used (and if used, it should
only be allocated in the transactional use case.)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message