cmu-db / peloton

The Self-Driving Database Management System
http://pelotondb.io
Apache License 2.0
2.03k stars 623 forks source link

Binder Infinite recursive calls of GetColumnObjects if the column tuple in pg_attribute is being modified and not committed #1356

Open Dingshilun opened 6 years ago

Dingshilun commented 6 years ago

Hi, we are working on Alter Table. And if we execute any txns like this: T1 T2 start
start Alter column (rename) select */select that modified column At this time, tuples belong to the table are modified but not committed. Basically any txns that read them would abort. Txn2 would be trapped in recursive GetColumnObjects() and finally get stack overflow. I think it is because that Binder doesn't handle the abort information from GetColumnObjects()'s scan executor and will keep trying. The entry of the recursive calls is binder_node_visitor's Visit().

poojanilangekar commented 6 years ago

Did you try using the fix from #1322?

Dingshilun commented 6 years ago

No I haven't. I will try using it. Will it be merged into master?

poojanilangekar commented 6 years ago

Eventually, yes. Not sure it will be merged before the 721 presentation day.

poojanilangekar commented 6 years ago

@Dingshilun I think I know what the other problem might be. Change the line 252 of column_catalog.cpp to return table_object->GetColumnObjects(true);. This would make sure that the TableCatalog returns the cached object. And the read only fix would make sure that Txn2 isn't aborted.