Comments (11)
SORTED_MAPPER
is using ObjectMapperProvider
which configures the JsonFactoryBuilder
to use JsonRecyclerPools.threadLocalPool()
. if this is ineffective I guess we need to report Jackson issue.
Update: it was fixed in master so not yet been released (part of Airlift 244 update: airlift/airlift@6d36ba3 and 00d867b)
Please test with 445 once it's released.
from trino.
Looks good, I can't reproduce the issue. I will keep testing and update if anything changes.
from trino.
That's great to hear, thanks! I wasn't checking other dependencies' upstream when investigating this. Will report back once 445 is out.
from trino.
I'm one of the author of the new Jackson pool and I would like to investigate the memory issue it caused, but at the moment I haven't been able to reproduce it on my side. Can anybody please explain how I could reproduce this problem? Thanks.
from trino.
should be now addressed with #21361.
Can you validate the change @davseitsev if possible since you seem to have a way to reproduce this?
from trino.
@hashhar I've applied your fix and testing it right now. I will update later.
from trino.
Closing then. Release should happen this week. Thanks!
from trino.
This issue appears to still be affecting us on Trino 444. We are running into massive memory issues with this. In our case, heap dumps indicate that JsonTypeUtil.parseJson
is at fault.
Some quick debugging shows that the issue is due to the SORTED_MAPPER.writeValue
call using the default JsonGenerator
instance which in turn gets created by a default JsonFactory
that uses the LockFreePool
implementation. Until the upstream maybe changes back the default again, it might be needed to perform a more systematic survey of Jackson usages to make sure this doesn't negatively affect more places.
Ideally, all ObjectMapper
instances would get created with the customized JsonFactory
that contains the configuration.
Alternatively, maybe explicitly downgrading the Jackson libraries is an option?
from trino.
Note that we're discussing this issue also here, so in case you have any suggestion on how to reproduce the problem it would be great to report it also there. In particular it would be very interesting if you could give a look at this comment and let me know if this could be relevant for your environment.
from trino.
@mariofusco have you seen how we are parsing JSON: https://github.com/trinodb/trino/blob/master/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/util/JsonTypeUtil.java#L46 ?
from trino.
I am also hoping to work on figuring out the underlying issue. I created a test:
which suggests some abnormal temporary growth in retention, but not quite the smoking gun. So hoping to learn if there is something specific that might trigger or amplify issues.
Another thing that would be good to know -- although I realize it may not be easy to try it out -- is whether use of one of alternate new pools, JsonRecyclerPools.newConcurrentDequePool()
-- would show good performance without requiring use of ThreadLocal
. The reason I am interested in this choice is that for Jackson 2.17.1 there is need to change the default and choices are reverting back to pre-2.17 ThreadLocal
-pool or concurrentDequePool
. And it would be great to base decision on observed performance from a real concurrency-heavy use case which I think Trino would qualify as.
from trino.
Related Issues (20)
- Test `TestDistributedEngineOnlyQueries.testAssignUniqueId` fails: incorrect results HOT 1
- Planning is not deterministic HOT 3
- java.lang.NoClassDefFoundError: io/trino/plugin/base/metrics/LongCount HOT 2
- Flaky test `TestHiveConnectorTest.testCreateTableWithEmptyBucketsAndCompressionCodec`: "Target directory for table already exists" HOT 1
- Table has exceeded max number of active streams error happens in BigQuery connector
- "Table has exceeded max number of active streams" error happens in BigQuery connector
- Deployment trino-server-445 NullPointerException HOT 6
- Proposal to Optimize Trino Hive Metastore Query Latency by Caching createMetastoreClient()
- Unable to insert a large volume of data into S3 bucket
- Pinot Connector Single Quote Escape Issue
- Function with LOOP fails with "Compiler failed [...] break target does not exist" when run on worker HOT 2
- [Trino JDBC] NoClassDefFoundError io/opentelemetry/semconv/SemanticAttributes HOT 1
- create table parquet external_location no values HOT 2
- Flaky test TestMongoConnectorTest.testInsertRowConcurrently
- `approx_percentile` can fail for bigint input values with no exact double representation HOT 1
- Trino S3 TLS HOT 1
- trino read file from s3a
- Flaky TestMongoDynamicFiltering.testJoinDynamicFilteringBlockProbeSide HOT 5
- Flaky `TestDeltaLakeLocalConcurrentWritesTest.testConcurrentInsertsSelectingFromTheSameVersionedTable` HOT 3
- HIVE_CANNOT_OPEN_SPLIT when reading AVRO with decimal fields. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trino.