Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-482

there can be only 254 ids created *within the same millisecond

Agile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.2 branch
    • 1.2 branch
    • Core Library
    • None

    Description

      Good catch! I found what the problem is - there can be only 254 ids
      created within the same millisecond. The test below fails with a
      message "Failed on 254":

      public void testIdPool() throws Exception {
      Set idSet = new HashSet();
      for (int i = 0; i < Integer.MAX_VALUE; i++)

      { assertTrue("Failed on " + i, idSet.add(new ObjectId ("Artist"))); }

      }

      While a slightly modified test succeeds (ok I only waited till 100000
      ids and canceled the test)

      public void testIdPool() throws Exception {
      Set idSet = new HashSet();
      for (int i = 0; i < Integer.MAX_VALUE; i++)

      { Thread.sleep(1); assertTrue("Failed on " + i, idSet.add(new ObjectId ("Artist"))); }

      }

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            andrus Andrus Adamchik
            entirer Tomas Jucius
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment