You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/09/25 11:15:10 UTC

[GitHub] [pulsar] BewareMyPower opened a new issue #8136: Question about deleting the schema of a topic

BewareMyPower opened a new issue #8136:
URL: https://github.com/apache/pulsar/issues/8136


   Currently a schema could be deleted by REST API:
   
   ```http
   DELETE /schemas/:tenant/:namespace/:topic/schema
   ```
   
   However, the implementation is:
   
   ```java
       // org.apache.pulsar.broker.service.schema.SchemaRegistryServiceImpl
       public CompletableFuture<SchemaVersion> deleteSchema(String schemaId, String user) {
           byte[] deletedEntry = deleted(schemaId, user).toByteArray();
           return schemaStorage.put(schemaId, deletedEntry, new byte[]{});
       }
   ```
   
   I'm not familiar with schema and wonder if it's necessary to create a new ledger instead of delete the current ledger. (for performance or compatibility?)
   
   And `SchemaStorage#delete` is never called. Anyway, I though there should be a way to delete the schema storage from client side.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on issue #8136: Question about deleting a topic's schema

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on issue #8136:
URL: https://github.com/apache/pulsar/issues/8136#issuecomment-699736838


   @jiazhai Just as I've said, appending a ledger is more efficient so it's the default behavior of delete schema. However, when we want to delete the topic but not only delete the schema, we need to delete the ledger instead of creating a new ledger. So we need to add an option to *delete* the schema when delete a topic.
   
   The current `deleteSchema` parameter of `deleteTopic` was not exposed, i.e. the API is like `deleteTopic(deleteSchema = false)` and is always called as `deleteTopic(false)`.
   
   By the way, the behavior of this parameter is also simply appending a new ledger, so we need to change it to deleting the existed schema ledgers.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower closed issue #8136: Question about deleting a topic's schema

Posted by GitBox <gi...@apache.org>.
BewareMyPower closed issue #8136:
URL: https://github.com/apache/pulsar/issues/8136


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] jiazhai commented on issue #8136: Question about deleting a topic's schema

Posted by GitBox <gi...@apache.org>.
jiazhai commented on issue #8136:
URL: https://github.com/apache/pulsar/issues/8136#issuecomment-699734386


   @BewareMyPower Seems you have already synced with @codelipenghui, Would you please help post the decision of how to handle this? Since you are working on this, would like to assign it to you.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on issue #8136: Question about deleting a topic's schema

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on issue #8136:
URL: https://github.com/apache/pulsar/issues/8136#issuecomment-701891268


   Close the issue by #8167 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org