JanusGraph - Distributed, open source, massively scalable graph database.


Potentially useless allocations when checking a field cardinality

πŸ‘‹πŸ» Hey folks In a service running JanusGraph embedded, I observed a number of sizeable allocations coming from JanusGraphVertexFeatures#getCardinality (https://github.com/JanusGraph/janusgraph/blob/2c71b378339a3ab49b961eef29b5a042d018f513/janusgraph-core/src/main/java/org/janusgraph/graphdb/tinkerpop/JanusGraphFeatures.java#L161-L169). From a profile (attached), it looks like...
No description

Java 17 support

When can we expect Janusgraph to support Java 17? πŸ™‚

Unable to load GraphSON file

Hi, I'm trying to load a very simple .json graph into JanusGraph from the gremlin console, but I get this error:
gremlin> g.io("/opt/janusgraph/graphson-test1.json").read().iterate();
Label can not be null
gremlin> g.io("/opt/janusgraph/graphson-test1.json").read().iterate();
Label can not be null

Gremlin statement exceeds the maximum compilation size

Hi all, I'm trying to do some script-based bulk writes to a JanusGraph server, but I get the following error message
'status': {'message': 'The Gremlin statement that was submitted exceeds the maximum compilation size allowed by the JVM, please split it into multiple smaller statements ...}
'status': {'message': 'The Gremlin statement that was submitted exceeds the maximum compilation size allowed by the JVM, please split it into multiple smaller statements ...}
I have set maxContentLength: 524288 in the server .yaml file to allow my client to sbmit larger scripts, because I found a significant performance improvement when submitting a larger set of queries at once. But now I'm hitting the JVM limit for compilation size, which I'd like to increase, if possible. ...
This error message means that the JVM internally threw a Method too large error. At least from a quick search, it looks like this is a hard limit which can be configured. That's at least what I got from this Stack Overflow question: https://stackoverflow.com/questions/3192896/how-to-circumvent-the-method-too-large-error-in-java-compilation...

Comma Separated Config Options Values Via Environment Variable?

Hey @Bo & @porunov I was trying out the retry logic added by my PR (https://github.com/JanusGraph/janusgraph/pull/4409) by setting environment variables in my docker compose like so: janusgraph.index.some_index_name_here.elasticsearch.retry-error-codes=408,429 Much like was done in the unit test I wrote (https://github.com/JanusGraph/janusgraph/blob/487e10ca276678862fd8fb369d6d17188703ba67/janusgraph-es/src/test/java/org/janusgraph/diskstorage/es/rest/RestClientSetupTest.java#L240). But to my surprise it doesn't seem to be received well during startup:...
Okay, after quite a journey of vetting the parsing behavior from environment variable into property files, into the various Confirmation implementations into ConfigOptions, etc etc I've found where this has gone sideways....and like the worst of these types of situations looks like this one was self inflicted πŸ€¦β€β™‚οΈ . A long long long time ago when I was starting on working with JanusGraph I was tired of JanusGraph deployments that silently failed and leaving my container up but dead inside the container, for reasons that weren't its fault (started up before Cassandra was ready timing out its storage wait time, etc). Trying to find solutions for that I stumbled upon the Tinkerpop CheckGraphManager (https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/CheckedGraphManager.java) that would automatically terminate the process if the specified graphs did not successfully open....

Creating a customer serializer Io Registry in Java

Hey folks, I've got a somewhat unusual use case I'd like to bring to G.V(). Some users have customer serializers configured on their servers and I'd like to find a way to allow them to configure G.V() using those custom serializers. My initial thought was to create a "custom" IoRegistry that loads those classes via reflection based on user input information (e.g. jar path and class name). Would that be the correct way to load custom serializers into a client Java codebase? I've been looking at some custom serializer examples but they focus mostly on the server side of things, not so much the client, gremlin-driver part of it...
cool, i think that clarifies everything, im clear on the approach to take moving forward for G.V(), the best solution is to simply allow onboarding a user's custom IO registry via a packaged jar, likely the same one they would drop under lib for their JG install

Kill a query?

Hey folks, is it possible to kill a long running query?

Server can't be started due to `lost+found` folder

I'm running JanusGraph as a docker container with a mounted volume at /var/lib/janusgraph. Experiencing this issue after restarting the container: ```sh chown: cannot read directory '/var/lib/janusgraph/lost+found': Permission denied...

Phantom Unique Data / Data Too Large?

I've been chasing down a weird writing bug for our graph writer, but I feel like I've stumbled into conflicting realities in my graph and wanted to share in case I'm missing something larger. For context the environment in play is my local development environment, all running inside docker compose (host machine is MacOS, on the off chance it matters). - JanusGraph 1.0.0 - Cassandra 4 - Elasticsearch 8...

Could not start BerkeleyJE transaction

Hey I've just encounter this issue and needed to restart the entire server for it to go away. I believe it's the issue being described here https://github.com/JanusGraph/janusgraph/issues/2120...

JanusGraphManagement from Java client

Is it possible to, from the GraphTraversalSource, get to a JanusGraphManagment instance?

~20% write performance hit when using custom str IDs?

Hi, I've been experimenting with using custom vertex IDs. I have a process that reads data from a file and writes (or updates with mergeV()) nodes to a JanusGraph 1.0.0 instance with a Cassandra+ES backend. Keeping exactly the same client code and test data, I noticed a 20% write slowdown when writing nodes with custom string IDs, rather than custom int IDs. In both cases, the IDs are exactly the same, with the only difference being that in one case I convert int to string, before submitting the query to the JG server (I'm using parametrized scripts submitted via gremlin-python). Is this a known issue? (I could not find info about this in the documentation)...

Mixed Index (ElasticSearch) Backpressure Ignored?

I understand that JG views writes to mixed indices as a "best effort" and documents(https://docs.janusgraph.org/operations/recovery/#transaction-failure) that failures in transactions with regards to mixed indices are left to a separate periodic clean up process after enabling JG's WAL:
If the primary persistence into the storage backend succeeds but secondary persistence into the indexing backends or the logging system fail, the transaction is still considered to be successful because the storage backend is the authoritative source of the graph. ... In addition, a separate process must be setup that reads the log to identify partially failed transaction and repair any inconsistencies caused....

Could not instantiate implementation: org.janusgraph.diskstorage.es.ElasticSearchIndex

i am using latets janusversion-1
this issue has been resolved ,there were credential issue

JanusGraph authentication - restricted privileges

Hi All, we secured our JanusGraph with SaslAuthenticationHandler as desribed in the docs (https://docs.janusgraph.org/operations/server/#advanced-janusgraph-server-configurations). The defined user now can be used to read/write data in the graph database as well as for managing the schema. Is there a way to create a user that can only perform read/write on the graph but cannot change the schema? Thank you for any pointer on this....
As "hadoopmarc" also answered on janusgraph-users list recently, the main pointers are: 1. authorization section of the Apache TinkerPop documentation (https://tinkerpop.apache.org/docs/current/reference/#authorization) 2. a sample file in the Gremlin server source code (https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/authz/AllowListAuthorizer.java) For reference, I thought it might be useful for others to share some snippets how I made authorization work with JanusGraph 1.0.0. The main purpose of authorization was to restrict users to access the JanusGraph Management System (e.g. open a graph and make schema changes on it)...

Issues faced for consistent indexing (both Composite & Mixed) [ElasticSearch]

--> Schema was provisioned, and then, all the schema was verified and the management objects closed. [All the indexes were in enabled state, both mixed and composite] --> [Issue:1] Index wasn't created in ElasticSearch, giving a 404, when a vertex totals direct Index Query is performed --> As a work around. for initial data 1000 Documents of sample data was ingested, and as we expected, the indexes were not present --> data was re-indexed. Indexes were created in ElasticSearch, and some composite indexes needed re-Indexing as well. After reindexing, the performance was as expected...
@Boxuan Li , while i was using multi-tenacy, there were more configs to be given to the elastic search as well, for the graphName. Marking this as resolved. The index was being created with janusgraph_IndexName, where as it was supposed to be created in tenant_IndexName, It was a misconfiguration, that wasn't carefully considered. ...

Custom ID best practice

Hey I'm looking into using custom ID for my DB vertices & came across this: https://github.com/JanusGraph/janusgraph/issues/1221#issuecomment-938060054 Where there is a mention of potentially moving to use UUID internally. Can I ask what's the overall consensus/traction on this? And does this mean it's preferable for new graphs to use custom id with UUID now? Thank you....


Is it possible to have both a composite and mixed index for a vertex property. If so, is it ever desirable?
Depending on your operator, the good index should be called. with equality (like in your exemple) yes the composite index should be called. In another traversal, if you go on a text operator, the mixed index will be called. It’s also depends on the type of index you specified for your property in your mixed index.

I need to perform upgrade my janusgraph to new version

Current Version Janus 0.6.3/Cassandra 4.0.5Migrate to Version Janus 1.0.0/Cassandra 4.0.6 how I can perform miggration...

script in empty-sample.groovy is called twice

I have JanusGraph running as it's own process and remote to it from Gremlin. Since i'm learning, i create an in-memory graph in empty-sample.goovy when i start JanusGraph g = graph.traversal() rV = g.addV('r').property('name', 'r-name').next()...