Skip to content

HBASE-29960 java.lang.IllegalStateException: Should not call create writer on secondary replicas or in read-only mode#7899

Open
sharmaar12 wants to merge 1 commit intoapache:HBASE-29081from
sharmaar12:illegalStateException
Open

HBASE-29960 java.lang.IllegalStateException: Should not call create writer on secondary replicas or in read-only mode#7899
sharmaar12 wants to merge 1 commit intoapache:HBASE-29081from
sharmaar12:illegalStateException

Conversation

@sharmaar12
Copy link

No description provided.

…riter on secondary replicas or in read-only mode
Copy link
Contributor

@anmolnar anmolnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment only, otherwise looks good to me.
Important to note that we've changed our original approach with this patch and now every table remains writable in "hbase" and "master" namespaces.

public final StoreFileWriter createWriter(CreateStoreFileWriterParams params) throws IOException {
if (!isPrimaryReplica || isReadOnlyEnabled()) {
if (
!isPrimaryReplica || (isReadOnlyEnabled() && !ctx.getTableName().isWritableInReadOnlyMode())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the other methods in this class? load(), add(), replace(), set()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants