Giter VIP home page Giter VIP logo

kayrock's Issues

Error in parsing V5.FetchRequest

Hello ! Thank you for making this library.

We are using KafkaEx (exact commit) and trying to upgrade the API version. We are passing this to the options to KafkaEx

 api_versions = %{fetch: 5, offset_fetch: 3, offset_commit: 3} 

Error, I have trimmed some of the stacktrace which is not important.

GenServer #PID<0.1707.0> terminating
** (stop) exited in: GenServer.call(#PID<0.1708.0>, {:fetch, %KafkaEx.Protocol.Fetch.Request{api_version: 5, auto_commit: false, client_id: nil, correlation_id: nil, max_bytes: 1000000, min_bytes: 1, offset: 974860, offset_commit_api_version: 0, partition: 12, topic: "brex_proto_custodian_finalize_reconciliation_settlement_event_topic", wait_time: 1000}}, 12000)
    ** (EXIT) an exception was raised:
        ** (RuntimeError) Parse error during %Kayrock.Fetch.V5.Request{client_id: "kafka_ex", correlation_id: 5, isolation_level: 0, max_bytes: 1000000, max_wait_time: 1000, min_bytes: 1, replica_id: -1, topics: [%{partitions: [%{fetch_offset: 974860, log_start_offset: 0, max_bytes: 1000000, partition: 12}], topic: "brex_proto_custodian_finalize_reconciliation_settlement_event_topic"}]} response deserializer. Couldn't parse: <<0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 1, 0, 67, 98, 114, 101, 120, 95, 112, 114, 111, 116, 111, 95, 99, 117, 115, 116, 111, 100, 105, 97, 110, 95, 102, 105, 110, 97, 108, 105, 122, 101, 95, 114, 101, 99, 111, 110, 99, ...>>
            (kayrock) lib/kayrock/record_batch.ex:351: Kayrock.RecordBatch.get_magic_byte/1
            (kayrock) lib/kayrock/record_batch.ex:245: Kayrock.RecordBatch.deserialize/5
            (kayrock) lib/generated/fetch.ex:2583: Kayrock.Fetch.V5.Response.deserialize_field/4
            (kayrock) lib/generated/fetch.ex:2593: anonymous fn/2 in Kayrock.Fetch.V5.Response.deserialize_field/4
            (kayrock) lib/generated/fetch.ex:2592: Kayrock.Fetch.V5.Response.deserialize_field/4
            (kayrock) lib/generated/fetch.ex:2614: anonymous fn/2 in Kayrock.Fetch.V5.Response.deserialize_field/4
            (kayrock) lib/generated/fetch.ex:2613: Kayrock.Fetch.V5.Response.deserialize_field/4
            (kafka_ex) lib/kafka_ex/new/client.ex:668: KafkaEx.New.Client.deserialize/2
            (kafka_ex) lib/kafka_ex/new/client.ex:566: KafkaEx.New.Client.run_client_request/3
            (kafka_ex) lib/kafka_ex/new/client.ex:541: KafkaEx.New.Client.kayrock_network_request/4
            (kafka_ex) lib/kafka_ex/new/client.ex:176: KafkaEx.New.Client.handle_call/3
            (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4
            (stdlib) gen_server.erl:690: :gen_server.handle_msg/6
            (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
    (elixir) lib/gen_server.ex:989: GenServer.call/3
Last message: :timeout

Can't compile on OTP 23 because `crc32cer` uses `erl_interface`

While trying to follow-up on the timeout bug in KafkaEx, I was asked on the OTP issue I created to check if the bug appears on OTP 23.

To this end, I tried to compile KafkaEx with elixir 1.10.2 and OTP 23.0-rc2 and that in turn fails because it depends on kayrock, which depends on crc32cer.

When running:

DEBUG=1 mix deps.compile crc32cer

I get:

[...]
===> sh(cc /code/deps/crc32cer/c_src/crc32c.o /code/deps/crc32cer/c_src/crc32c_nif.o $LDFLAGS -shared  -L"/usr/local/lib/erlang/lib/erl_interface-4.0/lib" -lerl_interface -lei -o /code/deps/crc32cer/priv/crc32cer_nif.so)
failed with return code 1 and the following output:
/usr/bin/ld: cannot find -lerl_interface

I suppose it is due to the removal of erl_interface:

The old legacy erl_interface library (functions with prefix erl_) is deprecated as of OTP 22, and will be removed in OTP 23.
http://erlang.org/doc/apps/erl_interface/erl_interface.pdf

Any clue what I can do to make it compile ?

cc @zmstone (I would have created an issue in the crc32cer repo, but issues don't seem enabled ?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.