micmnm opened a new issue, #10905:
URL: https://github.com/apache/ignite/issues/10905
I have an issue which I discovered while trying to store an Emoji character
inside a string - string which exists inside a tiny Object value.
My scenario is basically a chain of Get/Update operations where string value
is acting strangely and I'm not sure if it is configuration issue or a bug.
Using debug tool, you can see '\0' character being added along with some
other chars corrupting the value and reaching size limit eventually.
Not sure but looks like there is an issue either on
Serialization/Deserialization of the string.
My setup:
* .Net 6 which is referencing Apache.Ignite
* Ignite 2.15
* JAVA_HOME set to OpenJDK 11.0.20+8 - tried also OpenJDK_17.0.8_7 and same
results.
Sample code below on setting up a dummy cache and doing Get/Update:
```
IIgnite ignite = Ignition.Start();
Apache.Ignite.Core.Cache.ICache<Guid, Person> cache =
ignite.GetOrCreateCache<Guid, Person>(nameof(Person));
cache.Put( firstPerson.Id, new Person(){ Id = Guid.NewGuid(), Name="MrQ" } );
const int nbGetAndWrites = 8;
// Get, Update, Put same record multiple times and add each time an Emoji
for (int i = 0; i < nbGetAndWrites; i++)
{
Person fromCache = cache.Get(firstPerson.Id);
Console.WriteLine($"Step {i} got Person {fromCache}");
fromCache.Name += $" [🐝]";
cache.Put(fromCache.Id, fromCache);
}
```
Output:
```
Step 0 got Person [ Id=764d9799-6cb5-402e-93ba-ee3d1b87c0fb; Name=MrQ ]
Step 1 got Person [ Id=764d9799-6cb5-402e-93ba-ee3d1b87c0fb; Name=MrQ [🐝]' ]
Step 2 got Person [ Id=764d9799-6cb5-402e-93ba-ee3d1b87c0fb; Name=MrQ [🐝]'
[🐝] ]
Step 3 got Person [ Id=764d9799-6cb5-402e-93ba-ee3d1b87c0fb; Name=MrQ [🐝]'
[🐝] [🐝]( ]
Step 4 got Person [ Id=764d9799-6cb5-402e-93ba-ee3d1b87c0fb; Name=MrQ [🐝]'
[🐝] [🐝]( [🐝]eee???? ]
Step 5 got Person [ Id=764d9799-6cb5-402e-93ba-ee3d1b87c0fb; Name=MrQ [🐝]'
[🐝] [🐝]( [🐝]eee???? [🐝]ee???? ]
Step 6 got Person [ Id=764d9799-6cb5-402e-93ba-ee3d1b87c0fb; Name=MrQ [🐝]'
[🐝] [🐝]( [🐝]eee???? [🐝]ee???? [🐝]g/garbage-collector).ee??v?? ]
Step 7 got Person [ Id=764d9799-6cb5-402e-93ba-ee3d1b87c0fb; Name=MrQ [🐝]'
[🐝] [🐝]( [🐝]eee???? [🐝]ee???? [🐝]g/garbage-collector).ee??v??
[🐝]?v???v??`?v??`?v??p?v??p?v????v????v?? ]
```
[GitHub Sample Code](https://github.com/micmnm/SampleIgniteEmoji/tree/master)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]