apache / apache/accumulo

Compact command creates fate operation for offline table

Open
#3,242 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
1.2k
Forks
487
Avg merge
4d 5h
Merged PRs (30d)
13

Description

**Describe the bug**
The `compact` command will successfully create a fate operation to compact an offline table (the fate operation will eventually fail). I found this while testing the ondemand tables as I expected it to fail. For example, when I run a `merge` or `addsplits` operations against an offline table, I get the error:
```
[shell.Shell] ERROR: org.apache.accumulo.core.client.TableOfflineException: Table test (3) is offline
```

**Versions (OS, Maven, Java, and others, as appropriate):**
- Affected version(s) of this project: 3.0, probable that 1.10 and 2.1 are affected as well

**To Reproduce**
```
createtable test
offline test
addsplits m -t test
merge -b a -e z -t test
compact -t test
```

**Expected behavior**
I would expect the shell to return:
```
[shell.Shell] ERROR: org.apache.accumulo.core.client.TableOfflineException: Table test (3) is offline
```

Contributor guide

Open the contributing guide

Research direction

Start by running the reported shell sequence: create test, take it offline, then run compact -t test, and compare its behavior with merge or addsplits. Trace the compact command's validation path and identify where offline-table errors are handled. Done means compact returns a TableOfflineException instead of creating a fate operation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.