GetAllItemsFromSet truncated values on release 0.5.14
See original GitHub issueHi,
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:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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
Works like a charm. Thanks for the fix. 👍