Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6837503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:29:06+00:00 2026-05-26T23:29:06+00:00

This seems like a very strange problem. I’m stress testing my neo4j graph database,

  • 0

This seems like a very strange problem. I’m stress testing my neo4j graph database, and so one of my tests requires creating a lot of users (in this specific test, 1000). So the code for that is as follows,

// Creates a n users and measures the time taken to add another
            n = 1000;
            tx = graphDb.beginTx();
            try {
                for(int i = 0; i < n; i++){
                    dataService.createUser(BigInteger.valueOf(i));
                }

                start = System.nanoTime();
                dataService.createUser(BigInteger.valueOf(n));
                end = System.nanoTime();

                time = end - start;

                System.out.println("The time taken for createUser with " + n + " users is " + time +" nanoseconds.");

                tx.success();
            }
            finally
            {
                tx.finish();
            }

And the code for dataService.createUser() is,

public User createUser(BigInteger identifier) throws ExistsException {
        // Verify that user doesn't already exist.
        if (this.nodeIndex.get(UserWrapper.KEY_IDENTIFIER, identifier)
                .getSingle() != null) {
            throw new ExistsException("User with identifier '"
                    + identifier.toString() + "' already exists.");
        }

        // Create new user.
        final Node userNode = graphDb.createNode();
        final User user = new UserWrapper(userNode);
        user.setIdentifier(identifier);

        userParent.getNode().createRelationshipTo(userNode, NodeRelationships.PARENT);

        return user;
    }

Now I need to call dataService.getUser() after I’ve made these Users. The code for getUser() is as follows,

public User getUser(BigInteger identifier) throws DoesNotExistException {
        // Search for the user.
        Node userNode = this.nodeIndex.get(UserWrapper.KEY_IDENTIFIER,
                identifier).getSingle();
        // Return the wrapped user, if found.
        if (userNode != null) {
            return new UserWrapper(userNode);
        } else {
            throw new DoesNotExistException("User with identifier '"
                    + identifier.toString() + "' was not found.");
        }
    }

So everything is going fine until I create the 129th user. I’m following along in the debugger and watching the value of dataService.getUser(BigInteger.valueOf(1)) which is the second node, dataService.getUser(BigInteger.valueOf(127)) which is the 128th node, and dataService.getUser(BigInteger.valueOf(i-1)) which is the last node created. And the debugger is telling me that after node 128 is created, node 129 and above aren’t created because getUser() throws a DoesNotExistException for those nodes, but still gives values for node 2 and node 128.

The user id I’m passing to createUser() is autoindexed.

Any idea why it isn’t making more nodes (or not indexing these nodes)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:29:07+00:00Added an answer on May 26, 2026 at 11:29 pm

    It sounds suspiciously like a byte value conversion which flips around at 128. Could you make sure there isn’t anything like that going on in your code?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems like a very simple and a very common problem. The simplest example
I have an issue that seems like very flaky behavour, is this a problem
This seems like it should be something very easy to do, but every time
This seems like it should be very easy...anyway, it is in MS SQL Server
This seems like such a trivial problem, but I can't seem to pin how
Ok so this one is strange and I'm thinking there must be a problem
I am seeing a very strange problem on one of my production boxes. We
This is a very strange problem, when my program asks the user for the
This seems like a pretty softball question, but I always have a hard time
This seems like a simple question, but I can't find it with the Stack

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.