googleapis / googleapis/java-bigtable-hbase

Cannot use the delete method on BigtableTable with Immutable lists

Offen
#4,522 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
api: bigtable
Vorherrschende Sprache
Java
Sterne
184
Forks
184
Ø Merge
10 Std.
Gemergte PRs (30 T.)
6

Beschreibung

#### Environment details
Cannot delete rows using BigtableTable if the given List object is Immutable.
The workaround i've found is using plain ArrayList() as input but it seems wrong to me (how do we know we must provide mutable objects?)

1. Specify the API at the beginning of the title. General, Core, and Other are also allowed as types
3. OS type and version: Mac OS tahoe 26.2
4. Java version: 8
5. Version(s):
```

com.google.cloud.bigtable
bigtable-hbase-1.x-shaded
2.13.0

```
#### Steps to reproduce
when migrating bigtable-hbase-1.x-shaded from 1.11.0 to 2.13.0
1. use a BigtableTable object and use the delete method with an ImmutableList
2. the operation fails if the List object does not allow the remove() operation

#### Code example

```java
// example

// deletes is ImmutableList or Collections.unmodifiableList
table.delete(deletes);
// this will fail all the time
table.delete(Collections.unmodifiableList(deletes));

```

#### Stack trace
```
Any relevant stacktrace here.

java.lang.UnsupportedOperationException
at com.google.common.collect.ImmutableList.remove(ImmutableList.java:569)
at com.google.cloud.bigtable.hbase.BatchExecutor.batchCallback(BatchExecutor.java:303)
at com.google.cloud.bigtable.hbase.BatchExecutor.batch(BatchExecutor.java:237)
at com.google.cloud.bigtable.hbase.AbstractBigtableTable.delete(AbstractBigtableTable.java:422)
```

#### External references such as API reference guides

- ?

#### Any additional information below
The issue is still present on the master branch.
https://github.com/googleapis/java-bigtable-hbase/blob/b658fde3e71ee1e0b8cde0eb0c747ca2d05e7428/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BatchExecutor.java#L303

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne in bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BatchExecutor.java in Zeile 303 und verfolge anschließend den Aufruf von AbstractBigtableTable.delete. Reproduziere den Fehler mit ImmutableList oder Collections.unmodifiableList und überprüfe, dass das Löschen von Zeilen erfolgreich ist, ohne eine veränderbare Eingabeliste zu erfordern.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
databases
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.