-
Notifications
You must be signed in to change notification settings - Fork 662
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
KIP 396 ListOffsets #1029
KIP 396 ListOffsets #1029
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.
Some initial comments for Round 1.
Mostly addresses the code, some comments on test, and example is not reviewed.
For the public API stuff and how OffsetSpec will be used, we can also discuss internally with everyone to arrive at a consensus on all the bindings at once.
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.
Example is missing from README.md of the examples/ directory, and also the .gitgnore (see how the other examples are added)
I also checked valgrind for memory leaks in the example. No issues
Mostly, great work, thanks @mahajanadhitya !
ef70124
to
edf5c53
Compare
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.
Minor comments on the addressal itself.
Almost ready to merge.
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.
Approved, don't merge until librdkafka bundle is merged.
Good work @mahajanadhitya !
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.
Great job! Some small changes
kafka/adminoptions.go
Outdated
|
||
const ( | ||
// ReadUncommitted IsolationLevel | ||
ReadUncommitted = IsolationLevel(C.RD_KAFKA_ISOLATION_LEVEL_READ_UNCOMMITTED) |
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.
As other enums:
ReadUncommitted = IsolationLevel(C.RD_KAFKA_ISOLATION_LEVEL_READ_UNCOMMITTED) | |
IsolationLevelReadUncommitted = IsolationLevel(C.RD_KAFKA_ISOLATION_LEVEL_READ_UNCOMMITTED) |
kafka/adminoptions.go
Outdated
// ReadUncommitted IsolationLevel | ||
ReadUncommitted = IsolationLevel(C.RD_KAFKA_ISOLATION_LEVEL_READ_UNCOMMITTED) | ||
// ReadCommitted IsolationLevel | ||
ReadCommitted = IsolationLevel(C.RD_KAFKA_ISOLATION_LEVEL_READ_COMMITTED) |
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.
ReadCommitted = IsolationLevel(C.RD_KAFKA_ISOLATION_LEVEL_READ_COMMITTED) | |
IsolationLevelReadCommitted = IsolationLevel(C.RD_KAFKA_ISOLATION_LEVEL_READ_COMMITTED) |
kafka/adminapi.go
Outdated
cPartition := C.rd_kafka_ListOffsetsResultInfo_topic_partition(cResultInfo) | ||
Topic := C.GoString(cPartition.topic) | ||
Partition := TopicPartition{Topic: &Topic, Partition: int32(cPartition.partition)} | ||
Value.Offset = int64(cPartition.offset) |
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.
Value.Offset = int64(cPartition.offset) | |
Value.Offset = kafka.Offset(cPartition.offset) |
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.
Just using Offset() here since the package is already kafka
Addressed comments and merged master. |
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.
LGTM!
No description provided.