NiFi-4215 stackoverflow exception + patch

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

NiFi-4215 stackoverflow exception + patch

Wes Lawrence
Hey all,

While building some standard templates we'd like to ship to customers, I
found an issue where the AvroSchemaRegistry throws a stack overflow
exception on Avro schemas that define a record that composes itself, e.g;

{
  "namespace": "org.apache.nifi.testing",
  "name": "CompositRecord",
  "type": "record",
  "fields": [
    {
      "name": "id",
      "type": "int"
    },
    {
      "name": "value",
      "type": "string"
    },
    {
      "name": "parent",
      "type": [
        "null",
        "CompositRecord"
      ]
    }
  ]
}


The patch attached should take care of that use case, looking forward to
any feedback, and let me know if anything needs to be improved.

--Wes
Reply | Threaded
Open this post in threaded view
|

Re: NiFi-4215 stackoverflow exception + patch

Andy LoPresto-2
Hi Wes,

Thanks for discovering this and bringing it to our attention. The mailing list strips attachments, so your patch is not available here. The best course of action is to submit a pull request on GitHub, or attach the patch file to the Jira directly. Let us know if you need any assistance with these processes. Thanks again. 

Andy LoPresto
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

On Jul 25, 2017, at 11:34 AM, Wes Lawrence <[hidden email]> wrote:

Hey all,

While building some standard templates we'd like to ship to customers, I
found an issue where the AvroSchemaRegistry throws a stack overflow
exception on Avro schemas that define a record that composes itself, e.g;

{
 "namespace": "org.apache.nifi.testing",
 "name": "CompositRecord",
 "type": "record",
 "fields": [
   {
     "name": "id",
     "type": "int"
   },
   {
     "name": "value",
     "type": "string"
   },
   {
     "name": "parent",
     "type": [
       "null",
       "CompositRecord"
     ]
   }
 ]
}


The patch attached should take care of that use case, looking forward to
any feedback, and let me know if anything needs to be improved.

--Wes


signature.asc (859 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NiFi-4215 stackoverflow exception + patch

Joe Witt
He has a nice JIRA and PR up.  Think this is just to help find a reviewer.

Thanks
Joe

On Tue, Jul 25, 2017 at 3:08 PM, Andy LoPresto <[hidden email]> wrote:

> Hi Wes,
>
> Thanks for discovering this and bringing it to our attention. The mailing
> list strips attachments, so your patch is not available here. The best
> course of action is to submit a pull request on GitHub, or attach the patch
> file to the Jira directly. Let us know if you need any assistance with these
> processes. Thanks again.
>
> Andy LoPresto
> [hidden email]
> [hidden email]
> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69
>
> On Jul 25, 2017, at 11:34 AM, Wes Lawrence <[hidden email]> wrote:
>
> Hey all,
>
> While building some standard templates we'd like to ship to customers, I
> found an issue where the AvroSchemaRegistry throws a stack overflow
> exception on Avro schemas that define a record that composes itself, e.g;
>
> {
>  "namespace": "org.apache.nifi.testing",
>  "name": "CompositRecord",
>  "type": "record",
>  "fields": [
>    {
>      "name": "id",
>      "type": "int"
>    },
>    {
>      "name": "value",
>      "type": "string"
>    },
>    {
>      "name": "parent",
>      "type": [
>        "null",
>        "CompositRecord"
>      ]
>    }
>  ]
> }
>
>
> The patch attached should take care of that use case, looking forward to
> any feedback, and let me know if anything needs to be improved.
>
> --Wes
>
>
Reply | Threaded
Open this post in threaded view
|

Re: NiFi-4215 stackoverflow exception + patch

Wes Lawrence
Joe's right, there's a GitHub PR[1] and patch attached in JIRA[2], but I did say "patch attached" in my email, and forgot to add it; sorry about that Andy.

Attached this time, if that's convenient. =)

[1] https://github.com/apache/nifi/pull/2034
[2] https://issues.apache.org/jira/browse/NIFI-4215

--Wes

On Tue, Jul 25, 2017 at 3:22 PM, Joe Witt <[hidden email]> wrote:
He has a nice JIRA and PR up.  Think this is just to help find a reviewer.

Thanks
Joe

On Tue, Jul 25, 2017 at 3:08 PM, Andy LoPresto <[hidden email]> wrote:
> Hi Wes,
>
> Thanks for discovering this and bringing it to our attention. The mailing
> list strips attachments, so your patch is not available here. The best
> course of action is to submit a pull request on GitHub, or attach the patch
> file to the Jira directly. Let us know if you need any assistance with these
> processes. Thanks again.
>
> Andy LoPresto
> [hidden email]
> [hidden email]
> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69
>
> On Jul 25, 2017, at 11:34 AM, Wes Lawrence <[hidden email]> wrote:
>
> Hey all,
>
> While building some standard templates we'd like to ship to customers, I
> found an issue where the AvroSchemaRegistry throws a stack overflow
> exception on Avro schemas that define a record that composes itself, e.g;
>
> {
>  "namespace": "org.apache.nifi.testing",
>  "name": "CompositRecord",
>  "type": "record",
>  "fields": [
>    {
>      "name": "id",
>      "type": "int"
>    },
>    {
>      "name": "value",
>      "type": "string"
>    },
>    {
>      "name": "parent",
>      "type": [
>        "null",
>        "CompositRecord"
>      ]
>    }
>  ]
> }
>
>
> The patch attached should take care of that use case, looking forward to
> any feedback, and let me know if anything needs to be improved.
>
> --Wes
>
>