Bug 1018227

Summary: Cannot retrieve evicted entries from Microsoft SQL Server 2012/2008R2
Product: [JBoss] JBoss Data Grid 6 Reporter: Jakub Markos <jmarkos>
Component: ServerAssignee: Tristan Tarrant <ttarrant>
Status: ASSIGNED --- QA Contact: Martin Gencur <mgencur>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: afield, jdg-bugs, pzapataf
Target Milestone: ---   
Target Release: 7.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakub Markos 2013-10-11 13:55:02 UTC
Please see the linked JIRA for more information.

Comment 2 JBoss JIRA Server 2013-10-11 14:16:00 UTC
Martin Gencur <mgencur> made a comment on jira ISPN-3618

Jakub, can you check which encoding is configured in the database you're testing (with admins)? If it's not UTF, then it might be a problem of the database server's configuration. AFAIK, Infinispan needs UTF-8.

Comment 3 JBoss JIRA Server 2013-10-21 15:06:06 UTC
Jakub Markos <jmarkos> made a comment on jira ISPN-3618

The encoding is SQL_Latin1_General_CP1_CI_AS . Microsoft SQL servers don't even support UTF-8.

Comment 4 JBoss JIRA Server 2013-10-23 06:55:24 UTC
Martin Gencur <mgencur> made a comment on jira ISPN-3618

Yeah, the Microsoft SQL server does not seem to support UTF-8. It means that for string-based cache stores only "String" can be used as a key. The other types (coverted with Key2StringMapper) cannot. AFAIK, it also means that string-based cache store cannot be used at all if data is stored via HotRod. That's because HotRod does not send plain strings.

Comment 6 JBoss JIRA Server 2013-10-23 07:03:27 UTC
Martin Gencur <mgencur> made a comment on jira ISPN-3618

The solution/workaround could be to convert the UTF-8 data to UCS-2 which is supported by MS SQL server, but only if MS SQL server is used. Otherwise UTF-8 could remain.

Comment 7 Jakub Markos 2013-10-24 09:26:59 UTC
*** Bug 1022916 has been marked as a duplicate of this bug. ***

Comment 8 Alan Field 2014-12-17 14:50:55 UTC
Microsoft suggests storing the actual UTF-8 data on the server using the BINARY/VARBINARY/IMAGE columns, but that has its downsides too.

http://support.microsoft.com/kb/232580

Comment 9 Martin Gencur 2015-04-16 07:14:01 UTC
I was supposed to check with upstream Infinispan whether this has been fixed. I've just looked at the code of DefaultTwoWayKey2StringMapper and there hasn't been any change in two years. This means that the data is still prepended with '\uFEFF' which won't work with MS SQL Server.