We do things like this in our Maven pom.xml if that helps:

<database>
  <name>org.jooq.meta.postgres.PostgresDatabase</name>
  <includes>.*</includes>
  <inputSchema>public</inputSchema>
  <excludes>schema_version</excludes>
  <forcedTypes>
    <!--implicit conversion for DurationType-->
    <forcedType>
      <userType>com.spotify.sparta.model.api.DurationType</userType>
      <converter>com.spotify.sparta.model.data.DurationTypeConverter</converter>
      <includeExpression>(COMMITMENT_)?DURATION_TYPE</includeExpression>
      <includeTypes>DURATION_TYPE</includeTypes>
    </forcedType>

...

  /Helena


On Mon, Feb 1, 2021 at 5:51 PM Helena Åberg Östlund <[email protected]>
wrote:

> Hello,
>
> Don't know if it's in 3.14.5 as we never used that version, but I think
> what you found is the likely culprit.
>
> Yes we do create custom data types.
>
> I think it can be complicated to get approval for sharing the heap dump
> with you, but maybe you won't need it if you have identified the issue?
>
>  /Helena
>
>
> <https://inboxwhenready.org/?utm_campaign=signature&utm_medium=email&utm_source=signature>
> I'm using Inbox When Ready
> <https://inboxwhenready.org/?utm_campaign=signature&utm_medium=email&utm_source=signature>
> to protect my focus.
>
> On Mon, Feb 1, 2021 at 5:46 PM Lukas Eder <[email protected]> wrote:
>
>> Tracking down changes made to the DataType related classes between 3.14.5
>> and 3.14.6, I think this is the most likely candidate for the regression:
>> https://github.com/jOOQ/jOOQ/issues/11086
>>
>> Specifically, this commit could be creating increasing static Map sizes
>> without ever cleaning things up:
>>
>> https://github.com/jOOQ/jOOQ/commit/995cce0d6e60df9f7ba53962eec4eca5d1573d47
>>
>> From what I can tell so far, this leak could happen when you create
>> custom data types manually? Could that be something you're doing?
>>
>> Thanks,
>> Lukas
>>
>> On Monday, February 1, 2021 at 5:24:27 PM UTC+1 Lukas Eder wrote:
>>
>>> This will be tracked as https://github.com/jOOQ/jOOQ/issues/11345
>>>
>>> On Monday, February 1, 2021 at 5:17:52 PM UTC+1 Lukas Eder wrote:
>>>
>>>> Hi Helena,
>>>>
>>>> Thank you very much for your report. That's bad news! We'll investigate
>>>> this immediately and hope to be able to release 3.14.7 with a fix this 
>>>> week.
>>>>
>>>> A few additional questions:
>>>>
>>>> - Do you happen to know whether the regression happened in 3.14.5 or
>>>> 3.14.6?
>>>> - Can you post that dump somewhere for us to analyse? (E.g. by private
>>>> message to [email protected])
>>>> - Did you do anything particular to produce this leak (e.g. use custom
>>>> converters, bindings, etc.), or does it happen with any kind of jOOQ usage?
>>>>
>>>> We'll try to reproduce this on our end and revert back ASAP.
>>>> Best Regards,
>>>> Lukas
>>>>
>>>> On Mon, Feb 1, 2021 at 3:38 PM 'Helena Åberg Östlund' via jOOQ User
>>>> Group <[email protected]> wrote:
>>>>
>>>>> Hi Jooq team,
>>>>>
>>>>> We want to report an issue with the latest release. We upgraded from
>>>>> 3.14.4 to 3.14.6 and then experienced a memory leak where the heap was
>>>>> slowly filling up with instances of org.jooq.impl.DefaultDataType 
>>>>> instances.
>>>>>
>>>>> We took a java heap dump of our service (a spring-boot service) and
>>>>> analysed it with Eclipse Memory Analyzer Tool. It showed that 70% of the
>>>>> memory was accumulated in a java.util.LinkedHashMap which contained these
>>>>> DefaultDataType objects. We didn't dig into this further, but the problem
>>>>> completely disappeared once we downgraded back to 3.14.4 so our conclusion
>>>>> is that the issue was with the new release.
>>>>>
>>>>> Kind regards,
>>>>>    Helena
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "jOOQ User Group" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/jooq-user/8ed0184c-f9a9-4ff0-a694-7908a3aabbc3n%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/jooq-user/8ed0184c-f9a9-4ff0-a694-7908a3aabbc3n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "jOOQ User Group" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/jooq-user/4tM-YEuqISw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jooq-user/2329f3ef-ff9e-4737-a220-f6ae6a1f506en%40googlegroups.com
>> <https://groups.google.com/d/msgid/jooq-user/2329f3ef-ff9e-4737-a220-f6ae6a1f506en%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/CACm_RdhHaMjLoAZHg8UT6jrbNW-WzCfhdZk1FP%3DaEXY2TqAECQ%40mail.gmail.com.

Reply via email to