zbentley commented on issue #15433:
URL: https://github.com/apache/pulsar/issues/15433#issuecomment-1126984325

   @mattisonchao I suspect that the use of `pulsar-admin` is inducing too much 
latency to reproduce the issue, as `pulsar-admin` takes some time to start. We 
use a custom ORM to interact with Pulsar admin objects; below I have captured 
the HTTP calls made by the ORM in a situation that reproduces this bug. The 
steps are roughly the same (create namespace with various configs, create a 
topic in it, immediately attempt to terminate it.
   
   ```
   
http://localhost:8080/admin/v2/namespaces/chariot1/chariot_namespace_techtalk_topic
 -> 404; history: 
['http://localhost:8080/admin/v2/namespaces/chariot1/chariot_namespace_techtalk_topic'];
 kwargs: {}; response: {"reason":"Namespace does not exist"}
   http://localhost:8080/admin/v2/bookies/all -> 200; history: 
['http://localhost:8080/admin/v2/bookies/all']; kwargs: {}; response: 
{"bookies":[{"bookieId":"127.0.0.1:3181"}]}
   http://localhost:8080/admin/v2/racks-info -> 404; history: 
['http://localhost:8080/admin/v2/racks-info']; kwargs: {}; response:
   
http://localhost:8080/admin/v2/namespaces/chariot1/chariot_namespace_techtalk_topic
 -> 204; history: 
['http://localhost:8080/admin/v2/namespaces/chariot1/chariot_namespace_techtalk_topic'];
 kwargs: {'json': {'anti_affinity_group': None, 'backlog_quota_map': 
{'destination_storage': {'policy': 'producer_exception', 'limitSize': 4096, 
'limitTime': -1}}, 'retention_policies': {'retentionTimeInMinutes': 60, 
'retentionSizeInMB': -1}, 'persistence': {'bookkeeperEnsemble': 1, 
'bookkeeperWriteQuorum': 1, 'bookkeeperAckQuorum': 1, 
'managedLedgerMaxMarkDeleteRate': 0}, 'deduplicationEnabled': False, 
'autoSubscriptionCreationOverride': {'allowAutoSubscriptionCreation': False}, 
'autoTopicCreationOverride': {'allowAutoTopicCreation': False, 
'defaultNumPartitions': 0, 'topicType': 'non-partitioned'}, 
'message_ttl_in_seconds': 0, 'subscription_expiration_time_minutes': 0, 
'encryption_required': False, 'inactive_topic_policies': 
{'maxInactiveDurationSeconds': -1, 'inactiveTopicDeleteMode': 'delete
 _when_no_subscriptions', 'deleteWhileInactive': False}, 
'delayed_delivery_policies': {'tickTime': 30.0}, 'max_producers_per_topic': 
100, 'max_consumers_per_topic': 10, 'max_consumers_per_subscription': 0, 
'max_unacked_messages_per_subscription': 10000, 
'max_unacked_messages_per_consumer': 100, 'properties': {'chariot_primary': 
True, 'chariot_topic_config': '{"consumer_groups": [], "deduplicationEnabled": 
false, "delay_granularity": 30.0, "durability": "3", "envelope_extra_size": 
3145728, "folder": "sre", "max_consumers": 10, "max_message_size": 102400, 
"max_producers": 100, "partitions": 4, "payload": {"extra_settings": {}, 
"file_descriptor_set": "file {\\n  name: \\"techtalk_topic_envelope.proto\\"\\n 
 package: \\"techtalk_topic\\"\\n  dependency: 
\\"chariot/proto/common/tag.proto\\"\\n  message_type {\\n    name: 
\\"Heartbeat\\"\\n    field {\\n      name: \\"message\\"\\n      number: 1\\n  
    label: LABEL_REQUIRED\\n      type: TYPE_STRING\\n    }\\n  }\\n  
message_type {\\n   
  name: \\"ChariotMessage\\"\\n    field {\\n      name: 
\\"schema_version\\"\\n      number: 1\\n      label: LABEL_OPTIONAL\\n      
type: TYPE_ENUM\\n      type_name: 
\\".techtalk_topic.ChariotMessage.ChariotMessageSchemaVersion\\"\\n      
default_value: \\"V1\\"\\n    }\\n    field {\\n      name: \\"tags\\"\\n      
number: 2\\n      label: LABEL_REPEATED\\n      type: TYPE_MESSAGE\\n      
type_name: \\".chariot.proto.common.ChariotMessageTag\\"\\n    }\\n    field 
{\\n      name: \\"retries\\"\\n      number: 3\\n      label: 
LABEL_OPTIONAL\\n      type: TYPE_UINT32\\n      default_value: \\"0\\"\\n    
}\\n    field {\\n      name: \\"data\\"\\n      number: 5\\n      label: 
LABEL_OPTIONAL\\n      type: TYPE_MESSAGE\\n      type_name: 
\\".techtalk_topic.Heartbeat\\"\\n      oneof_index: 0\\n    }\\n    field {\\n 
     name: \\"noop\\"\\n      number: 6\\n      label: LABEL_OPTIONAL\\n      
type: TYPE_MESSAGE\\n      type_name: 
\\".techtalk_topic.ChariotMessage.ChariotNoopMessage\
 \"\\n      oneof_index: 0\\n    }\\n    nested_type {\\n      name: 
\\"ChariotNoopMessage\\"\\n      field {\\n        name: \\"data\\"\\n        
number: 1\\n        label: LABEL_OPTIONAL\\n        type: TYPE_STRING\\n      
}\\n    }\\n    enum_type {\\n      name: \\"ChariotMessageSchemaVersion\\"\\n  
    value {\\n        name: \\"V1\\"\\n        number: 1\\n      }\\n    }\\n   
 oneof_decl {\\n      name: \\"payload\\"\\n    }\\n    reserved_range {\\n     
 start: 4\\n      end: 5\\n    }\\n  }\\n}\\n"}, "rate_limits": [{"actions": 
["3"], "bytes": null, "messages": 1000, "period": 60.0}], "send_timeout": 1.0, 
"thresholds": [{"actions": ["2"], "age": 3600.0, "kind": "1", "size": null}, 
{"actions": ["4"], "age": null, "kind": "2", "size": 4096}]}'}, 
'is_allow_auto_update_schema': True, 'schema_validation_enforced': False}}; 
response:
   
http://localhost:8080/admin/v2/persistent/chariot1/chariot_namespace_techtalk_topic/chariot_topic_techtalk_topic/partitions
 -> 204; history: 
['http://localhost:8080/admin/v2/persistent/chariot1/chariot_namespace_techtalk_topic/chariot_topic_techtalk_topic/partitions'];
 kwargs: {'json': 4}; response:
   
http://localhost:8080/admin/v2/persistent/chariot1/chariot_namespace_techtalk_topic
 -> 200; history: 
['http://localhost:8080/admin/v2/persistent/chariot1/chariot_namespace_techtalk_topic'];
 kwargs: {}; response: 
["persistent://chariot1/chariot_namespace_techtalk_topic/chariot_topic_techtalk_topic-partition-0","persistent://chariot1/chariot_namespace_techtalk_topic/chariot_topic_techtalk_topic-partition-1","persistent://chariot1/chariot_namespace_techtalk_topic/chariot_topic_techtalk_topic-partition-2","persistent://chariot1/chariot_namespace_techtalk_topic/chariot_topic_techtalk_topic-partition-3"]
   
http://localhost:8080/admin/v2/persistent/chariot1/chariot_namespace_techtalk_topic/chariot_topic_techtalk_topic/partitions
 -> 200; history: 
['http://localhost:8080/admin/v2/persistent/chariot1/chariot_namespace_techtalk_topic/chariot_topic_techtalk_topic/partitions'];
 kwargs: {}; response: {"partitions":4}
   
http://localhost:8080/admin/v2/persistent/chariot1/chariot_namespace_techtalk_topic/chariot_topic_techtalk_topic/terminate/partitions
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to