Java Doc for SR12885Test.java in  » JMX » je » com » sleepycat » je » cleaner » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » JMX » je » com.sleepycat.je.cleaner 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sleepycat.je.cleaner.SR12885Test

SR12885Test
public class SR12885Test extends TestCase (Code)
Reproduces a problem found in SR12885 where we failed to migrate a pending LN if the slot was reused by an active transaction and that transaction was later aborted. This bug can manifest as a LogNotFoundException. However, there was another bug that caused this bug to manifest sometimes as a NOTFOUND return value. This secondary problem -- more sloppyness than a real bug -- was that the PendingDeleted flag was not cleared during an abort. If the PendingDeleted flag is set, the low level fetch method will return null rather than throwing a LogFileNotFoundException. This caused a NOTFOUND in some cases. The sequence that causes the bug is: 1) The cleaner processes a file containing LN-A (node A) for key X. Key X is a non-deleted LN. 2) The cleaner sets the migrate flag on the BIN entry for LN-A. 3) In transaction T-1, LN-A is deleted and replaced by LN-B with key X, reusing the same slot but assigning a new node ID. At this point both node IDs (LN-A and LN-B) are locked. 4) The cleaner (via a checkpoint or eviction that logs the BIN) tries to migrate LN-B, the current LN in the BIN, but finds it locked. It adds LN-B to the pending LN list. 5) T-1 aborts, putting the LSN of LN-A back into the BIN slot. 6) In transaction T-2, LN-A is deleted and replaced by LN-C with key X, reusing the same slot but assigning a new node ID. At this point both node IDs (LN-A and LN-C) are locked. 7) The cleaner (via a checkpoint or wakeup) processes the pending LN-B. It first gets a lock on node B, then does the tree lookup. It finds LN-C in the tree, but it doesn't notice that it has a different node ID than the node it locked. 8) The cleaner sees that LN-C is deleted, and therefore no migration is necessary -- this is incorrect. It removes LN-B from the pending list, allowing the cleaned file to be deleted. 9) T-2 aborts, putting the LSN of LN-A back into the BIN slot. 10) A fetch of key X will fail, since the file containing the LSN for LN-A has been deleted. If we didn't clear the PendingDeleted flag, this will cause a NOTFOUND error instead of a LogFileNotFoundException.



Constructor Summary
public  SR12885Test()
    

Method Summary
public  voidsetUp()
    
public  voidtearDown()
    
public  voidtestSR12885()
    


Constructor Detail
SR12885Test
public SR12885Test()(Code)




Method Detail
setUp
public void setUp() throws IOException, DatabaseException(Code)



tearDown
public void tearDown() throws IOException, DatabaseException(Code)



testSR12885
public void testSR12885() throws DatabaseException(Code)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.