-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Resolve compatibility with previous version of C++ client #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PULSAR_DISABLE_YCA ?
|
I don't think we can or should maintain compatibility with the internal version. One example is that the C++ namespace was already changed ( |
|
Matteo,
It's easier to address the namespace difference just by adding
-Dpulsar=cms during compilation. Even dev packages can be generated by
replacing pulsar to cms. This way, we don't have to maintain 2 versions of
headers and made duplicate changes.
Andrews.
…On Fri, Feb 24, 2017 at 2:22 PM, Matteo Merli ***@***.***> wrote:
I don't think we can or should maintain compatibility with the internal
version. One example is that the C++ namespace was already changed (cms::
to pulsar::) , so the source-level compatibility is already gone.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#241 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ATk4LKzjd5LIum17NMfElSEM9nwRML77ks5rf1gigaJpZM4MKwkl>
.
|
580e21a to
f5531ed
Compare
|
👍 @merlimat your thoughts? I think this is better than maintaining older version of Auth.h and Auth.cc. |
|
@saandrews I still don't see how source level compatibility can be maintained. Eg: how can you enable YCA? yca auth implementation is not included in this repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we mark the compatibility method as deprecated? This way we can remove them once all the users updated the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean like following?
#ifdef PULSAR_ENABLE_DEPRECATED_METHOD
enum AuthType {
AuthNone,
AuthYcaV1
};
#endifThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This good too. In addition, can you also update the comment to say this is deprecated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about a comment in the code. But the macro looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YCA macro logic should be reversed, like PULSAR_ENABLE_YCA with default false.
|
@saandrews @yush1ga Looks good to me. Change a couple of minor things. |
f5531ed to
b74fe7d
Compare
b74fe7d to
cb793d3
Compare
merlimat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…est endpoint) to WorkerService (apache#239)" (apache#241) This reverts commit 8fd1fd1870753ea8fb2576873800380ac2cea3dd.
Fixes apache#230 The offset field is not filled when a PRODUCE request is processed yet. It causes that the offset what Kafka producer get from send()'s callback is always -1, which may cause some problems like apache#241 mentioned. This PR fills the offset field and add a unit test to verify if the right offset is set.
Master issue: apache#241 This PR add support for Kafka CreateTopics request so that topics can be created by Kafka's AdminClient. Related tests are added to verify The validateOnly field introduced from CreateTopics request v1 is not processed. The validateOnly field only checks the topics can be created as specified but not creates anything. It's not a important feature currently so leave it as a future task. * Add handler for CreateTopics request * Fix wrong numTopics and default namespace * Add test for CreateTopics request handler * Handle the corner case when topic name is invalid * Add this to make code more readable
Master issue: apache#241 Currently if a Kafka Client tries to list all topics, the topic name in response will contain the namespace prefix like "persistent://public/default". However, for topics in the default namespace, they shouldn't contain the prefix because Kafka Client would like to use the short topic name. So this PR will remove the prefix of topics in the default namespace. * Add a method to remove the default namespace prefix * Use short topic name if the topic is in the default namespace * Change variable name to avoid conflict * Fix simpleProduceAndConsumeWithPulsarAuthed test error
Master issue: apache#241 This PR add support for Kafka DescribeConfigs request. The request is to get topic or broker related configs from Kafka but the Kafka's config is much different from KoP. We just only support request for topic's configs and use the default config value so that Confluent Schema Registry can run with KoP. * Handle DescribeConfig request * Add check for topic existence * Fix NPE when DescribeConfigsRequest has no config names * Check for non-existed topic * Add unit test for DescribeConfigsRequest
Motivation
The compatibility with previous versions was lost due to past versions .
Modifications
I readded some classes and methods for compatibility with previous versions.
Result
Previous versions clients can be compiled with latest version's header.