Feeds importer imports only some of the nodes In D7.59 I have to import .csv file and there are all the mappings prepared for that. The file has 500 records, that will become nodes of a content type "record". There are no nodes of this content type in Drupal before the import (all nodes are deleted). When I start the import after it finishes I get the result, that 334 nodes were created and 266 nodes were updated. 

Log does not show any errors by the way.

I presume that there are some kind of feeds cache that has to be cleared, to make sure that it does not think that some of the nodes are still in the site. Can someone tell me what SQL tables I should truncate, or maybe there is another way to solving this?
Feeds keep track of previously imported items in the feeds_item table. This also includes items that were only updated by Feeds, but not originally created by Feeds.

Under normal circumstances, when you delete an entity imported/updated by Feeds, Feeds will delete the corresponding import meta data from the feeds_item table. There can be occasions where this does not happen. These are:


During the deletion of the entity, a PHP fatal error occurred which prevented Feeds from cleaning up the import metadata. Non-fatal errors should not cause this, as Drupal would then perform a rollback of the deletion.
Feeds is disabled when deleting the entity.


Feeds doesn't clean up orphaned items from the feeds_item table. To clean this up, you'll need to execute a query on that table. The id column represents the importer ID and feed_nid the feed node ID (the latter is only used when you have attached your importer to a content type and you need to create a node to import content).

Example query to delete all import metadata for the importer 'my_importer':

DELETE FROM feeds_item WHERE id = 'my_importer';

There is an issue to let Feeds automatically clean up orphaned feed items: https://www.drupal.org/project/feeds/issues/1394320

For more information about the feeds_item table, see https://www.drupal.org/node/1768352