ctdb database vacuuming for geniuses
play

CTDB database vacuuming for geniuses Amitay Isaacs amitay@samba.org - PowerPoint PPT Presentation

CTDB database vacuuming for geniuses Amitay Isaacs amitay@samba.org Samba Team IBM (Australia Development Labs, Linux Technology Center) Amitay Isaacs CTDB database vacuuming for geniuses CTDB Project Motivation: Support for clustered Samba


  1. Volatile database – data model – remote access rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Node3 : Samba requests record1 Node3 : Where is record1 ? Node3 : Request for record1 Node2 : Where is record1 ? Node2 : Redirect request for record1 Node2 : Where is record1 ? Node1 : Migrate record1 to Node2 Node2 : Receive record1 and update location Node2 : Migrate record1 to Node3 Node3 : Receive record1 Node3 : Send reply to samba Amitay Isaacs CTDB database vacuuming for geniuses

  2. Volatile database – data model – record deletion rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Amitay Isaacs CTDB database vacuuming for geniuses

  3. Volatile database – data model – record deletion rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Node3 : Samba deletes record1 Amitay Isaacs CTDB database vacuuming for geniuses

  4. Volatile database – data model – record deletion rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Node3 : Samba deletes record1 Record is actually not deleted Amitay Isaacs CTDB database vacuuming for geniuses

  5. Volatile database – data model – record deletion rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Node3 : Samba deletes record1 Record is actually not deleted There are copies of the record1 on all nodes Amitay Isaacs CTDB database vacuuming for geniuses

  6. Volatile database – data model – record deletion rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Node3 : Samba deletes record1 Record is actually not deleted There are copies of the record1 on all nodes How to delete all copies? Amitay Isaacs CTDB database vacuuming for geniuses

  7. Volatile database – data model – record deletion rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Node3 : Samba deletes record1 Record is actually not deleted There are copies of the record1 on all nodes How to delete all copies? Node3 : Record is marked to be deleted Amitay Isaacs CTDB database vacuuming for geniuses

  8. Volatile database – data model – record deletion rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Node3 : Samba deletes record1 Record is actually not deleted There are copies of the record1 on all nodes How to delete all copies? Node3 : Record is marked to be deleted Vacuuming Amitay Isaacs CTDB database vacuuming for geniuses

  9. Volatile database – vacuuming rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Amitay Isaacs CTDB database vacuuming for geniuses

  10. Volatile database – vacuuming rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Node3 : Record is marked for deletion Amitay Isaacs CTDB database vacuuming for geniuses

  11. Volatile database – vacuuming rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Node3 : Record is marked for deletion Node3 : Vacuuming: Send the record to lmaster Amitay Isaacs CTDB database vacuuming for geniuses

  12. Volatile database – vacuuming rsn:3 rsn:7 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Node3 : Record is marked for deletion Node3 : Vacuuming: Send the record to lmaster Node2 : Receive record & mark for deletion Amitay Isaacs CTDB database vacuuming for geniuses

  13. Volatile database – vacuuming rsn:3 rsn:7 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Node3 : Record is marked for deletion Node3 : Vacuuming: Send the record to lmaster Node2 : Receive record & mark for deletion Node2 : Vacuuming: Delete record from other nodes Amitay Isaacs CTDB database vacuuming for geniuses

  14. Volatile database – vacuuming rsn:7 Node1 Node2 Node3 LMASTER DMASTER Node3 : Record is marked for deletion Node3 : Vacuuming: Send the record to lmaster Node2 : Receive record & mark for deletion Node2 : Vacuuming: Delete record from other nodes Amitay Isaacs CTDB database vacuuming for geniuses

  15. Volatile database – vacuuming rsn:7 Node1 Node2 Node3 LMASTER DMASTER Node3 : Record is marked for deletion Node3 : Vacuuming: Send the record to lmaster Node2 : Receive record & mark for deletion Node2 : Vacuuming: Delete record from other nodes Node2 : Vacuuming: Delete record locally Amitay Isaacs CTDB database vacuuming for geniuses

  16. Volatile database – vacuuming Node1 Node2 Node3 Node3 : Record is marked for deletion Node3 : Vacuuming: Send the record to lmaster Node2 : Receive record & mark for deletion Node2 : Vacuuming: Delete record from other nodes Node2 : Vacuuming: Delete record locally Amitay Isaacs CTDB database vacuuming for geniuses

  17. Volatile database – recovery rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Amitay Isaacs CTDB database vacuuming for geniuses

  18. Volatile database – recovery rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Node1 : Starts database recovery Amitay Isaacs CTDB database vacuuming for geniuses

  19. Volatile database – recovery rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Recovery Helper Node1 : Starts database recovery Amitay Isaacs CTDB database vacuuming for geniuses

  20. Volatile database – recovery rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Recovery Helper Node1 : Starts database recovery Recovery: Freeze database Amitay Isaacs CTDB database vacuuming for geniuses

  21. Volatile database – recovery rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Recovery Helper Node1 : Starts database recovery Recovery: Freeze database Recovery: Collect records from Node1 Amitay Isaacs CTDB database vacuuming for geniuses

  22. Volatile database – recovery rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Recovery Helper rsn:3 Node1 : Starts database recovery Recovery: Freeze database Recovery: Collect records from Node1 Amitay Isaacs CTDB database vacuuming for geniuses

  23. Volatile database – recovery rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Recovery Helper rsn:3 Node1 : Starts database recovery Recovery: Freeze database Recovery: Collect records from Node1 Recovery: Collect records from Node2 Amitay Isaacs CTDB database vacuuming for geniuses

  24. Volatile database – recovery rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Recovery Helper rsn:3 Node1 : Starts database recovery Recovery: Freeze database Recovery: Collect records from Node1 Recovery: Collect records from Node2 Amitay Isaacs CTDB database vacuuming for geniuses

  25. Volatile database – recovery rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Recovery Helper rsn:3 Node1 : Starts database recovery Recovery: Freeze database Recovery: Collect records from Node1 Recovery: Collect records from Node2 Recovery: Collect records from Node3 Amitay Isaacs CTDB database vacuuming for geniuses

  26. Volatile database – recovery rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Recovery Helper rsn:5 Node1 : Starts database recovery Recovery: Freeze database Recovery: Collect records from Node1 Recovery: Collect records from Node2 Recovery: Collect records from Node3 Amitay Isaacs CTDB database vacuuming for geniuses

  27. Volatile database – recovery rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Recovery Helper rsn:5 Node1 : Starts database recovery Recovery: Freeze database Recovery: Collect records from Node1 Recovery: Collect records from Node2 Recovery: Collect records from Node3 Recovery: Push the records to all the nodes Amitay Isaacs CTDB database vacuuming for geniuses

  28. Volatile database – recovery rsn:5 rsn:5 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Recovery Helper Node1 : Starts database recovery Recovery: Freeze database Recovery: Collect records from Node1 Recovery: Collect records from Node2 Recovery: Collect records from Node3 Recovery: Push the records to all the nodes Amitay Isaacs CTDB database vacuuming for geniuses

  29. Volatile database – recovery rsn:5 rsn:5 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Recovery Helper Node1 : Starts database recovery Recovery: Freeze database Recovery: Collect records from Node1 Recovery: Collect records from Node2 Recovery: Collect records from Node3 Recovery: Push the records to all the nodes Recovery: Thaw database Amitay Isaacs CTDB database vacuuming for geniuses

  30. Zombie outbreak Amitay Isaacs CTDB database vacuuming for geniuses

  31. Resurrection of the dead – background Amitay Isaacs CTDB database vacuuming for geniuses

  32. Resurrection of the dead – background Inactive node(s) Amitay Isaacs CTDB database vacuuming for geniuses

  33. Resurrection of the dead – background Inactive node(s) Node is stopped Amitay Isaacs CTDB database vacuuming for geniuses

  34. Resurrection of the dead – background Inactive node(s) Node is stopped Node is banned Amitay Isaacs CTDB database vacuuming for geniuses

  35. Resurrection of the dead – background Inactive node(s) Node is stopped Node is banned What happens? Amitay Isaacs CTDB database vacuuming for geniuses

  36. Resurrection of the dead – background Inactive node(s) Node is stopped Node is banned What happens? VNN map changes Amitay Isaacs CTDB database vacuuming for geniuses

  37. Resurrection of the dead – background Inactive node(s) Node is stopped Node is banned What happens? VNN map changes . . . causing database recovery Amitay Isaacs CTDB database vacuuming for geniuses

  38. Resurrection of the dead – background Inactive node(s) Node is stopped Node is banned What happens? VNN map changes . . . causing database recovery What happens when node becomes active again? Amitay Isaacs CTDB database vacuuming for geniuses

  39. Resurrection of the dead – background Inactive node(s) Node is stopped Node is banned What happens? VNN map changes . . . causing database recovery What happens when node becomes active again? VNN map changes . . . causing database recovery Amitay Isaacs CTDB database vacuuming for geniuses

  40. Resurrection of the dead – example rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Amitay Isaacs CTDB database vacuuming for geniuses

  41. Resurrection of the dead – example rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Node3 becomes inactive Amitay Isaacs CTDB database vacuuming for geniuses

  42. Resurrection of the dead – example rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Recovery Helper Node3 becomes inactive Node1 starts recovery Amitay Isaacs CTDB database vacuuming for geniuses

  43. Resurrection of the dead – example rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Recovery Helper Node3 becomes inactive Node1 starts recovery Recovery: Collect records from Node1 & Node2 Amitay Isaacs CTDB database vacuuming for geniuses

  44. Resurrection of the dead – example rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Recovery Helper rsn:3 Node3 becomes inactive Node1 starts recovery Recovery: Collect records from Node1 & Node2 Amitay Isaacs CTDB database vacuuming for geniuses

  45. Resurrection of the dead – example rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Recovery Helper rsn:3 Node3 becomes inactive Node1 starts recovery Recovery: Collect records from Node1 & Node2 Recovery: Push the records to Node1 & Node2 Amitay Isaacs CTDB database vacuuming for geniuses

  46. Resurrection of the dead – example rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER DMASTER Recovery Helper rsn:3 Node3 becomes inactive Node1 starts recovery Recovery: Collect records from Node1 & Node2 Recovery: Push the records to Node1 & Node2 Amitay Isaacs CTDB database vacuuming for geniuses

  47. Resurrection of the dead – example rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER DMASTER Node3 becomes inactive Node1 starts recovery Recovery: Collect records from Node1 & Node2 Recovery: Push the records to Node1 & Node2 Recovery done Amitay Isaacs CTDB database vacuuming for geniuses

  48. Resurrection of the dead – example rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER DMASTER Node3 becomes inactive Node1 starts recovery Recovery: Collect records from Node1 & Node2 Recovery: Push the records to Node1 & Node2 Recovery done Node2 : Samba deletes record Amitay Isaacs CTDB database vacuuming for geniuses

  49. Resurrection of the dead – example rsn:5 Node1 Node2 Node3 DMASTER Node3 becomes inactive Node1 starts recovery Recovery: Collect records from Node1 & Node2 Recovery: Push the records to Node1 & Node2 Recovery done Node2 : Samba deletes record Node2 : Vacuuming removes record Amitay Isaacs CTDB database vacuuming for geniuses

  50. Resurrection of the dead – example rsn:5 Node1 Node2 Node3 DMASTER Node3 becomes inactive Node1 starts recovery Recovery: Collect records from Node1 & Node2 Recovery: Push the records to Node1 & Node2 Recovery done Node2 : Samba deletes record Node2 : Vacuuming removes record Node3 becomes active Amitay Isaacs CTDB database vacuuming for geniuses

  51. Resurrection of the dead – example rsn:5 Node1 Node2 Node3 DMASTER Node3 becomes inactive Node1 starts recovery Recovery: Collect records from Node1 & Node2 Recovery: Push the records to Node1 & Node2 Recovery done Node2 : Samba deletes record Node2 : Vacuuming removes record Node3 becomes active Zombie record! Amitay Isaacs CTDB database vacuuming for geniuses

  52. Keeping ’em dead rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER Amitay Isaacs CTDB database vacuuming for geniuses

  53. Keeping ’em dead rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER When Node3 becomes inactive , Amitay Isaacs CTDB database vacuuming for geniuses

  54. Keeping ’em dead rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER When Node3 becomes inactive , . . . invalidate all records Amitay Isaacs CTDB database vacuuming for geniuses

  55. Keeping ’em dead rsn:3 rsn:3 rsn:5 Node1 Node2 Node3 LMASTER DMASTER DMASTER When Node3 becomes inactive , . . . invalidate all records . . . database recovery Amitay Isaacs CTDB database vacuuming for geniuses

  56. Keeping ’em dead rsn:5 Node1 Node2 Node3 DMASTER When Node3 becomes inactive , . . . invalidate all records . . . database recovery Record is deleted and vacuumed Amitay Isaacs CTDB database vacuuming for geniuses

  57. Keeping ’em dead rsn:5 Node1 Node2 Node3 DMASTER When Node3 becomes inactive , . . . invalidate all records . . . database recovery Record is deleted and vacuumed Node3 becomes active , Amitay Isaacs CTDB database vacuuming for geniuses

  58. Keeping ’em dead Node1 Node2 Node3 When Node3 becomes inactive , . . . invalidate all records . . . database recovery Record is deleted and vacuumed Node3 becomes active , . . . database recovery Amitay Isaacs CTDB database vacuuming for geniuses

  59. Keeping ’em dead Node1 Node2 Node3 When Node3 becomes inactive , . . . invalidate all records . . . database recovery Record is deleted and vacuumed Node3 becomes active , . . . database recovery Patches coming soon Amitay Isaacs CTDB database vacuuming for geniuses

  60. Restructure Amitay Isaacs CTDB database vacuuming for geniuses

  61. Existing issues with vacuuming Amitay Isaacs CTDB database vacuuming for geniuses

  62. Existing issues with vacuuming Vacuuming done in a child process Amitay Isaacs CTDB database vacuuming for geniuses

  63. Existing issues with vacuuming Vacuuming done in a child process Forks a process from main ctdb daemon Amitay Isaacs CTDB database vacuuming for geniuses

  64. Existing issues with vacuuming Vacuuming done in a child process Forks a process from main ctdb daemon Can be very expensive Amitay Isaacs CTDB database vacuuming for geniuses

  65. Existing issues with vacuuming Vacuuming done in a child process Forks a process from main ctdb daemon Can be very expensive Migrating deleted record to lmaster Amitay Isaacs CTDB database vacuuming for geniuses

  66. Existing issues with vacuuming Vacuuming done in a child process Forks a process from main ctdb daemon Can be very expensive Migrating deleted record to lmaster CTDB daemon itself cannot start record migration Amitay Isaacs CTDB database vacuuming for geniuses

Recommend


More recommend