question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GetAllItemsFromSet truncated values on release 0.5.14

See original GitHub issue

Hi,

With the latest release (0.5.14), the GetAllItemsFromSet truncates values which contains “:”. Seems related to changes done for #168, the format in db has changed. I’m using Hangfire.Console which relies on the set feature. JSON values are saved in a set (multiple usage of "😊. When retrieved by the extension, values are truncated resulting in JSON parse exception, breaking the extension. This is not a migration, as I can reproduce the issue with a clean db as well.

Here is a small unit test to replicate the issue. “11:22” is expected for the first value (behavior in 0.5.13); “22” is returned instead (behavior in 0.5.14).

        [Fact, CleanDatabase]
        public void GetAllItemsFromSet_ReturnsAllItems_WithCorrectValues()
        {
            using (var t = this._connection.CreateWriteTransaction())
            {
                t.AddToSet("some-set", "11:22");
                t.AddToSet("some-set", "33");
                t.Commit();
            }

            // Act
            var result = _connection.GetAllItemsFromSet("some-set");

            // Assert
            Assert.Equal(new[] { "11:22", "33" }, result);
        }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gottscjcommented, Jan 2, 2019

@scadorel,

Thanks for the unit test. I SetDto actually still has a “Value” field which should have been used.

I will supply a fix shortly

0reactions
scadorelcommented, Jan 4, 2019

Works like a charm. Thanks for the fix. 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Truncate filter plugin | Logstash Reference [8.9]
Allows you to truncate fields longer than a given length. This truncates on bytes values, not character count. In practice, this should mean ......
Read more >
Documentation: 15: TRUNCATE
Automatically restart sequences owned by columns of the truncated table(s). CONTINUE IDENTITY. Do not change the values of sequences. This is the default....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found