| 66 | } |
| 67 | |
| 68 | bool TableMatcher::matchTable(const MetaName& tableName) |
| 69 | { |
| 70 | try |
| 71 | { |
| 72 | bool enabled = false; |
| 73 | if (!m_tables.get(tableName, enabled)) |
| 74 | { |
| 75 | enabled = true; |
| 76 | |
| 77 | if (m_includeMatcher) |
| 78 | enabled = m_includeMatcher->matches(tableName.c_str(), tableName.length()); |
| 79 | |
| 80 | if (enabled && m_excludeMatcher) |
| 81 | enabled = !m_excludeMatcher->matches(tableName.c_str(), tableName.length()); |
| 82 | |
| 83 | m_tables.put(tableName, enabled); |
| 84 | } |
| 85 | |
| 86 | return enabled; |
| 87 | } |
| 88 | catch (const Exception&) |
| 89 | { |
| 90 | // If we failed matching the table name due to some internal error, then |
| 91 | // let's allow the table to be replicated. This is not a critical failure. |
| 92 | return true; |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | |
| 97 | // Replication manager |